diff --git a/packages/google-cloud-netapp/.OwlBot.yaml b/packages/google-cloud-netapp/.OwlBot.yaml new file mode 100644 index 000000000000..e92d94b96a67 --- /dev/null +++ b/packages/google-cloud-netapp/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deep-copy-regex: + - source: /google/cloud/netapp/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-netapp/$1 + +api-name: netapp \ No newline at end of file diff --git a/packages/google-cloud-netapp/.eslintignore b/packages/google-cloud-netapp/.eslintignore new file mode 100644 index 000000000000..ea5b04aebe68 --- /dev/null +++ b/packages/google-cloud-netapp/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-netapp/.eslintrc.json b/packages/google-cloud-netapp/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/google-cloud-netapp/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-netapp/.gitattributes b/packages/google-cloud-netapp/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-netapp/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-netapp/.gitignore b/packages/google-cloud-netapp/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/google-cloud-netapp/.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-netapp/.jsdoc.js b/packages/google-cloud-netapp/.jsdoc.js new file mode 100644 index 000000000000..16362034078f --- /dev/null +++ b/packages/google-cloud-netapp/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/netapp', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-netapp/.mocharc.js b/packages/google-cloud-netapp/.mocharc.js new file mode 100644 index 000000000000..49e7e228701d --- /dev/null +++ b/packages/google-cloud-netapp/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-netapp/.nycrc b/packages/google-cloud-netapp/.nycrc new file mode 100644 index 000000000000..b18d5472b62b --- /dev/null +++ b/packages/google-cloud-netapp/.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-netapp/.prettierignore b/packages/google-cloud-netapp/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/google-cloud-netapp/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-netapp/.prettierrc.js b/packages/google-cloud-netapp/.prettierrc.js new file mode 100644 index 000000000000..1e6cec783e40 --- /dev/null +++ b/packages/google-cloud-netapp/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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-netapp/.repo-metadata.json b/packages/google-cloud-netapp/.repo-metadata.json new file mode 100644 index 000000000000..6237022da1d1 --- /dev/null +++ b/packages/google-cloud-netapp/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "netapp", + "name_pretty": "NetApp API", + "product_documentation": "https://cloud.google.com/netapp/volumes/docs/discover/overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/netapp/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/netapp", + "api_id": "netapp.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "netapp" +} + diff --git a/packages/google-cloud-netapp/CODE_OF_CONDUCT.md b/packages/google-cloud-netapp/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-netapp/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-netapp/CONTRIBUTING.md b/packages/google-cloud-netapp/CONTRIBUTING.md new file mode 100644 index 000000000000..2161fae34c98 --- /dev/null +++ b/packages/google-cloud-netapp/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the NetApp API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=netapp.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-netapp/LICENSE b/packages/google-cloud-netapp/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-netapp/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-netapp/README.md b/packages/google-cloud-netapp/README.md new file mode 100644 index 000000000000..28765e7a1f84 --- /dev/null +++ b/packages/google-cloud-netapp/README.md @@ -0,0 +1,224 @@ +[//]: # "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 + +# [NetApp API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-netapp) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/netapp.svg)](https://www.npmjs.org/package/@google-cloud/netapp) + + + + +NetApp API client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-netapp/CHANGELOG.md). + +* [NetApp API Node.js Client API Reference][client-docs] +* [NetApp API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-netapp](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-netapp) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the NetApp 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/netapp +``` + + +### Using the client library + +```javascript +/** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ +/** + * Required. Parent value + */ +// const parent = 'abc123' +/** + * The maximum number of items to return. + */ +// const pageSize = 1234 +/** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ +// const pageToken = 'abc123' +/** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ +// const orderBy = 'abc123' +/** + * List filter. + */ +// const filter = 'abc123' + +// Imports the Netapp library +const {NetAppClient} = require('@google-cloud/netapp').v1; + +// Instantiates a client +const netappClient = new NetAppClient(); + +async function callListStoragePools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listStoragePoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } +} + +callListStoragePools(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-netapp/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Net_app.create_active_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_active_directory.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.create_kms_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.create_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_replication.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.create_snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_snapshot.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.create_storage_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_storage_pool.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.create_volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_volume.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.delete_active_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_active_directory.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.delete_kms_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.delete_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_replication.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.delete_snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_snapshot.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.delete_storage_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_storage_pool.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.delete_volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_volume.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.encrypt_volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.encrypt_volumes.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.get_active_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_active_directory.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.get_kms_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.get_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_replication.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.get_snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_snapshot.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.get_storage_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_storage_pool.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.get_volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_volume.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.list_active_directories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_active_directories.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.list_kms_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.list_replications | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_replications.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.list_snapshots | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_snapshots.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.list_storage_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_storage_pools.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.list_volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_volumes.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.resume_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.resume_replication.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.reverse_replication_direction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.reverse_replication_direction.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.revert_volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.revert_volume.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.stop_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.stop_replication.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.update_active_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_active_directory.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.update_kms_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.update_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_replication.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.update_snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_snapshot.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.update_storage_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_storage_pool.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.update_volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js) | [![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_volume.js,packages/google-cloud-netapp/samples/README.md) | +| Net_app.verify_kms_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js,packages/google-cloud-netapp/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/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-netapp/samples/quickstart.js,packages/google-cloud-netapp/samples/README.md) | + + + +The [NetApp 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://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/netapp@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/netapp/latest +[product-docs]: https://cloud.google.com/netapp/volumes/docs/discover/overview +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=netapp.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-netapp/package.json b/packages/google-cloud-netapp/package.json new file mode 100644 index 000000000000..dc450b659453 --- /dev/null +++ b/packages/google-cloud-netapp/package.json @@ -0,0 +1,70 @@ +{ + "name": "@google-cloud/netapp", + "version": "0.0.0", + "description": "NetApp API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-cloud-netapp" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-netapp", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google netapp", + "netapp", + "NetApp API" + ], + "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", + "postpack": "minifyProtoJson", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^4.0.3" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^20.4.5", + "@types/sinon": "^10.0.0", + "c8": "^8.0.1", + "gapic-tools": "^0.1.8", + "gts": "^5.0.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "linkinator": "4.1.2", + "long": "^5.2.3", + "mocha": "^9.2.2", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "typescript": "^5.1.6" + }, + "engines": { + "node": ">=14.0.0" + } +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto new file mode 100644 index 000000000000..79293e524fcc --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto @@ -0,0 +1,223 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "ActiveDirectoryProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListActiveDirectoriesRequest for requesting multiple active directories. +message ListActiveDirectoriesRequest { + // Required. Parent value for ListActiveDirectoriesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// ListActiveDirectoriesResponse contains all the active directories requested. +message ListActiveDirectoriesResponse { + // The list of active directories. + repeated ActiveDirectory active_directories = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetActiveDirectory for getting a single active directory. +message GetActiveDirectoryRequest { + // Required. Name of the active directory. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; +} + +// CreateActiveDirectoryRequest for creating an active directory. +message CreateActiveDirectoryRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Required. Fields of the to be created active directory. + ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the active directory to create. + string active_directory_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateActiveDirectoryRequest for updating an active directory. +message UpdateActiveDirectoryRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Active Directory resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being updated + ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteActiveDirectoryRequest for deleting a single active directory. +message DeleteActiveDirectoryRequest { + // Required. Name of the active directory. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; +} + +// ActiveDirectory is the public representation of the active directory config. +message ActiveDirectory { + option (google.api.resource) = { + type: "netapp.googleapis.com/ActiveDirectory" + pattern: "projects/{project}/locations/{location}/activeDirectories/{active_directory}" + }; + + // The Active Directory States + enum State { + // Unspecified Active Directory State + STATE_UNSPECIFIED = 0; + + // Active Directory State is Creating + CREATING = 1; + + // Active Directory State is Ready + READY = 2; + + // Active Directory State is Updating + UPDATING = 3; + + // Active Directory State is In use + IN_USE = 4; + + // Active Directory State is Deleting + DELETING = 5; + + // Active Directory State is Error + ERROR = 6; + } + + // Output only. The resource name of the active directory. + // Format: + // `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the active directory. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the AD. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Name of the Active Directory domain + string domain = 4 [(google.api.field_behavior) = REQUIRED]; + + // The Active Directory site the service will limit Domain Controller + // discovery too. + string site = 5; + + // Required. Comma separated list of DNS server IP addresses for the Active + // Directory domain. + string dns = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. NetBIOSPrefix is used as a prefix for SMB server name. + string net_bios_prefix = 7 [(google.api.field_behavior) = REQUIRED]; + + // The Organizational Unit (OU) within the Windows Active Directory the user + // belongs to. + string organizational_unit = 8; + + // If enabled, AES encryption will be enabled for SMB communication. + bool aes_encryption = 9; + + // Required. Username of the Active Directory domain administrator. + string username = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. Password of the Active Directory domain administrator. + string password = 11 [(google.api.field_behavior) = REQUIRED]; + + // Users to be added to the Built-in Backup Operator active directory group. + repeated string backup_operators = 12; + + // Domain users to be given the SeSecurityPrivilege. + repeated string security_operators = 13; + + // Name of the active directory machine. This optional parameter is used only + // while creating kerberos volume + string kdc_hostname = 14; + + // KDC server IP address for the active directory machine. + string kdc_ip = 15; + + // If enabled, will allow access to local users and LDAP users. If access is + // needed for only LDAP users, it has to be disabled. + bool nfs_users_with_ldap = 16; + + // Description of the active directory. + string description = 17; + + // Specifies whether or not the LDAP traffic needs to be signed. + bool ldap_signing = 18; + + // If enabled, traffic between the SMB server to Domain Controller (DC) will + // be encrypted. + bool encrypt_dc_connections = 19; + + // Labels for the active directory. + map labels = 20; + + // Output only. The state details of the Active Directory. + string state_details = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto new file mode 100644 index 000000000000..2eec5a18daca --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto @@ -0,0 +1,502 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/active_directory.proto"; +import "google/cloud/netapp/v1/kms.proto"; +import "google/cloud/netapp/v1/replication.proto"; +import "google/cloud/netapp/v1/snapshot.proto"; +import "google/cloud/netapp/v1/storage_pool.proto"; +import "google/cloud/netapp/v1/volume.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "CloudNetappServiceProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; + +// NetApp Files Google Cloud Service +service NetApp { + option (google.api.default_host) = "netapp.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns descriptions of all storage pools owned by the caller. + rpc ListStoragePools(ListStoragePoolsRequest) + returns (ListStoragePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/storagePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new storage pool. + rpc CreateStoragePool(CreateStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/storagePools" + body: "storage_pool" + }; + option (google.api.method_signature) = + "parent,storage_pool,storage_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "StoragePool" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified storage pool by poolId. + rpc GetStoragePool(GetStoragePoolRequest) returns (StoragePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/storagePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the storage pool properties with the full spec + rpc UpdateStoragePool(UpdateStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}" + body: "storage_pool" + }; + option (google.api.method_signature) = "storage_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "StoragePool" + metadata_type: "OperationMetadata" + }; + } + + // Warning! This operation will permanently delete the storage pool. + rpc DeleteStoragePool(DeleteStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/storagePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Volumes in a given project. + rpc ListVolumes(ListVolumesRequest) returns (ListVolumesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/volumes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Volume. + rpc GetVolume(GetVolumeRequest) returns (Volume) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Volume in a given project and location. + rpc CreateVolume(CreateVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/volumes" + body: "volume" + }; + option (google.api.method_signature) = "parent,volume,volume_id"; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Volume. + rpc UpdateVolume(UpdateVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{volume.name=projects/*/locations/*/volumes/*}" + body: "volume" + }; + option (google.api.method_signature) = "volume,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Volume. + rpc DeleteVolume(DeleteVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Revert an existing volume to a specified snapshot. + // Warning! This operation will permanently revert all changes made after the + // snapshot was created. + rpc RevertVolume(RevertVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*}:revert" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all snapshots for a volume. + rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + }; + option (google.api.method_signature) = "parent"; + } + + // Describe a snapshot for a volume. + rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a new snapshot for a volume. + rpc CreateSnapshot(CreateSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + body: "snapshot" + }; + option (google.api.method_signature) = "parent,snapshot,snapshot_id"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a snapshot. + rpc DeleteSnapshot(DeleteSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates the settings of a specific snapshot. + rpc UpdateSnapshot(UpdateSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}" + body: "snapshot" + }; + option (google.api.method_signature) = "snapshot,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "OperationMetadata" + }; + } + + // Lists active directories. + rpc ListActiveDirectories(ListActiveDirectoriesRequest) + returns (ListActiveDirectoriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/activeDirectories" + }; + option (google.api.method_signature) = "parent"; + } + + // Describes a specified active directory. + rpc GetActiveDirectory(GetActiveDirectoryRequest) returns (ActiveDirectory) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/activeDirectories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // CreateActiveDirectory + // Creates the active directory specified in the request. + rpc CreateActiveDirectory(CreateActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/activeDirectories" + body: "active_directory" + }; + option (google.api.method_signature) = + "parent,active_directory,active_directory_id"; + option (google.longrunning.operation_info) = { + response_type: "ActiveDirectory" + metadata_type: "OperationMetadata" + }; + } + + // Update the parameters of an active directories. + rpc UpdateActiveDirectory(UpdateActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}" + body: "active_directory" + }; + option (google.api.method_signature) = "active_directory,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ActiveDirectory" + metadata_type: "OperationMetadata" + }; + } + + // Delete the active directory specified in the request. + rpc DeleteActiveDirectory(DeleteActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/activeDirectories/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all KMS configs owned by the caller. + rpc ListKmsConfigs(ListKmsConfigsRequest) returns (ListKmsConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/kmsConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new KMS config. + rpc CreateKmsConfig(CreateKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/kmsConfigs" + body: "kms_config" + }; + option (google.api.method_signature) = "parent,kms_config,kms_config_id"; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified KMS config by kms_config_id. + rpc GetKmsConfig(GetKmsConfigRequest) returns (KmsConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Kms config properties with the full spec + rpc UpdateKmsConfig(UpdateKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}" + body: "kms_config" + }; + option (google.api.method_signature) = "kms_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Encrypt the existing volumes without CMEK encryption with the desired the + // KMS config for the whole region. + rpc EncryptVolumes(EncryptVolumesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Verifies KMS config reachability. + rpc VerifyKmsConfig(VerifyKmsConfigRequest) + returns (VerifyKmsConfigResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify" + body: "*" + }; + } + + // Warning! This operation will permanently delete the Kms config. + rpc DeleteKmsConfig(DeleteKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all replications for a volume. + rpc ListReplications(ListReplicationsRequest) + returns (ListReplicationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + }; + option (google.api.method_signature) = "parent"; + } + + // Describe a replication for a volume. + rpc GetReplication(GetReplicationRequest) returns (Replication) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a new replication for a volume. + rpc CreateReplication(CreateReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + body: "replication" + }; + option (google.api.method_signature) = "parent,replication,replication_id"; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a replication. + rpc DeleteReplication(DeleteReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates the settings of a specific replication. + rpc UpdateReplication(UpdateReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}" + body: "replication" + }; + option (google.api.method_signature) = "replication,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Stop Cross Region Replication. + rpc StopReplication(StopReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Resume Cross Region Replication. + rpc ResumeReplication(ResumeReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Reverses direction of replication. Source becomes destination and + // destination becomes source. + rpc ReverseReplicationDirection(ReverseReplicationDirectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been canceled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto new file mode 100644 index 000000000000..2aa2ba6a32ef --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto @@ -0,0 +1,49 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// The service levels - Storage Pool, Volumes +enum ServiceLevel { + SERVICE_LEVEL_UNSPECIFIED = 0; + + PREMIUM = 1; + + EXTREME = 2; + + // Standard (Software offering) + STANDARD = 3; +} + +// Defined the current volume encryption key source. +enum EncryptionType { + // The source of encryption key is not specified. + ENCRYPTION_TYPE_UNSPECIFIED = 0; + + // Google managed encryption key. + SERVICE_MANAGED = 1; + + // Customer managed encryption key, which is stored in KMS. + CLOUD_KMS = 2; +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto new file mode 100644 index 000000000000..0547e49d31dd --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto @@ -0,0 +1,238 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "KmsProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// GetKmsConfigRequest gets a KMS Config. +message GetKmsConfigRequest { + // Required. Name of the KmsConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// ListKmsConfigsRequest lists KMS Configs. +message ListKmsConfigsRequest { + // Required. Parent value + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListKmsConfigsResponse is the response to a ListKmsConfigsRequest. +message ListKmsConfigsResponse { + // The list of KmsConfigs + repeated KmsConfig kms_configs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// CreateKmsConfigRequest creates a KMS Config. +message CreateKmsConfigRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Required. Id of the requesting KmsConfig + // If auto-generating Id server-side, remove this field and + // id from the method_signature of Create RPC + string kms_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The required parameters to create a new KmsConfig. + KmsConfig kms_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateKmsConfigRequest updates a KMS Config. +message UpdateKmsConfigRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // KmsConfig resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The KmsConfig being updated + KmsConfig kms_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteKmsConfigRequest deletes a KMS Config. +message DeleteKmsConfigRequest { + // Required. Name of the KmsConfig. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// EncryptVolumesRequest specifies the KMS config to encrypt existing volumes. +message EncryptVolumesRequest { + // Required. Name of the KmsConfig. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// VerifyKmsConfigRequest specifies the KMS config to be validated. +message VerifyKmsConfigRequest { + // Required. Name of the KMS Config to be verified. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// VerifyKmsConfigResponse contains the information if the config is correctly +// and error message. +message VerifyKmsConfigResponse { + // Output only. If the customer key configured correctly to the encrypt + // volume. + bool healthy = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message if config is not healthy. + string health_error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Instructions for the customers to provide the access to the + // encryption key. + string instructions = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// KmsConfig is the customer managed encryption key(CMEK) configuration. +message KmsConfig { + option (google.api.resource) = { + type: "netapp.googleapis.com/KmsConfig" + pattern: "projects/{project}/locations/{location}/kmsConfigs/{kms_config}" + }; + + // The KmsConfig States + enum State { + // Unspecified KmsConfig State + STATE_UNSPECIFIED = 0; + + // KmsConfig State is Ready + READY = 1; + + // KmsConfig State is Creating + CREATING = 2; + + // KmsConfig State is Deleting + DELETING = 3; + + // KmsConfig State is Updating + UPDATING = 4; + + // KmsConfig State is In Use. + IN_USE = 5; + + // KmsConfig State is Error + ERROR = 6; + + // KmsConfig State is Pending to verify crypto key access. + KEY_CHECK_PENDING = 7; + + // KmsConfig State is Not accessbile by the SDE service account to the + // crypto key. + KEY_NOT_REACHABLE = 8; + + // KmsConfig State is Disabling. + DISABLING = 9; + + // KmsConfig State is Disabled. + DISABLED = 10; + + // KmsConfig State is Migrating. + // The existing volumes are migrating from SMEK to CMEK. + MIGRATING = 11; + } + + // Output only. Name of the KmsConfig. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Customer managed crypto key resource full name. Format: + // projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of the KmsConfig. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the KmsConfig. + string state_details = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the KmsConfig. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the KmsConfig. + string description = 6; + + // Labels as key value pairs + map labels = 7; + + // Output only. Instructions to provide the access to the customer provided + // encryption key. + string instructions = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Service account which will have access to the customer + // provided encryption key. + string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto new file mode 100644 index 000000000000..b11f4497c681 --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto @@ -0,0 +1,366 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "ReplicationProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// TransferStats reports all statistics related to replication transfer. +message TransferStats { + // bytes trasferred so far in current transfer. + optional int64 transfer_bytes = 1; + + // Total time taken during transfer. + optional google.protobuf.Duration total_transfer_duration = 2; + + // Last transfer size in bytes. + optional int64 last_transfer_bytes = 3; + + // Time taken during last transfer. + optional google.protobuf.Duration last_transfer_duration = 4; + + // Lag duration indicates the duration by which Destination region volume + // content lags behind the primary region volume content. + optional google.protobuf.Duration lag_duration = 5; + + // Time when progress was updated last. + optional google.protobuf.Timestamp update_time = 6; + + // Time when last transfer completed. + optional google.protobuf.Timestamp last_transfer_end_time = 7; + + // A message describing the cause of the last transfer failure. + optional string last_transfer_error = 8; +} + +// Replication is a nested resource under Volume, that describes a +// cross-region replication relationship between 2 volumes in different +// regions. +message Replication { + option (google.api.resource) = { + type: "netapp.googleapis.com/Replication" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}" + }; + + // The replication states + // New enum values may be added in future to indicate possible new states. + enum State { + // Unspecified replication State + STATE_UNSPECIFIED = 0; + + // Replication is creating. + CREATING = 1; + + // Replication is ready. + READY = 2; + + // Replication is updating. + UPDATING = 3; + + // Replication is deleting. + DELETING = 5; + + // Replication is in error state. + ERROR = 6; + } + + // New enum values may be added in future to support different replication + // topology. + enum ReplicationRole { + // Unspecified replication role + REPLICATION_ROLE_UNSPECIFIED = 0; + + // Indicates Source volume. + SOURCE = 1; + + // Indicates Destination volume. + DESTINATION = 2; + } + + // Schedule for Replication. + // New enum values may be added in future to support different frequency of + // replication. + enum ReplicationSchedule { + // Unspecified ReplicationSchedule + REPLICATION_SCHEDULE_UNSPECIFIED = 0; + + // Replication happens once every 10 minutes. + EVERY_10_MINUTES = 1; + + // Replication happens once every hour. + HOURLY = 2; + + // Replication happens once every day. + DAILY = 3; + } + + // Mirroring states. + // No new value is expected to be added in future. + enum MirrorState { + // Unspecified MirrorState + MIRROR_STATE_UNSPECIFIED = 0; + + // Destination volume is being prepared. + PREPARING = 1; + + // Destination volume has been initialized and is ready to receive + // replication transfers. + MIRRORED = 2; + + // Destination volume is not receiving replication transfers. + STOPPED = 3; + + // Replication is in progress. + TRANSFERRING = 4; + } + + // Output only. The resource name of the Replication. + // Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the replication. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the replication. + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether this points to source or destination. + ReplicationRole role = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Indicates the schedule for replication. + ReplicationSchedule replication_schedule = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Indicates the state of mirroring. + MirrorState mirror_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Condition of the relationship. Can be one of the following: + // - true: The replication relationship is healthy. It has not missed the most + // recent scheduled transfer. + // - false: The replication relationship is not healthy. It has missed the + // most recent scheduled transfer. + optional bool healthy = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Replication create time. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Full name of destination volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + string destination_volume = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Output only. Replication transfer statistics. + TransferStats transfer_stats = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 12; + + // A description about this replication relationship. + optional string description = 13; + + // Required. Input only. Destination volume parameters + DestinationVolumeParameters destination_volume_parameters = 14 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. Full name of source volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + string source_volume = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; +} + +// ListReplications lists replications. +message ListReplicationsRequest { + // Required. The volume for which to retrieve replication information, + // in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Replication" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListReplicationsResponse is the result of ListReplicationsRequest. +message ListReplicationsResponse { + // A list of replications in the project for the specified volume. + repeated Replication replications = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetReplicationRequest gets the state of a replication. +message GetReplicationRequest { + // Required. The replication resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// DestinationVolumeParameters specify input parameters used for creating +// destination volume. +message DestinationVolumeParameters { + // Required. Existing destination StoragePool name. + string storage_pool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Desired destination volume resource id. If not specified, source volume's + // resource id will be used. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string volume_id = 2; + + // Destination volume's share name. If not specified, source volume's share + // name will be used. + string share_name = 3; + + // Description for the destination volume. + optional string description = 4; +} + +// CreateReplicationRequest creates a replication. +message CreateReplicationRequest { + // Required. The NetApp volume to create the replications of, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Replication" + } + ]; + + // Required. A replication resource + Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the replication to create. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string replication_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteReplicationRequest deletes a replication. +message DeleteReplicationRequest { + // Required. The replication resource name, in the format + // `projects/*/locations/*/volumes/*/replications/{replication_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// UpdateReplicationRequest updates description and/or labels for a replication. +message UpdateReplicationRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A replication resource + Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// StopReplicationRequest stops a replication until resumed. +message StopReplicationRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; + + // Indicates whether to stop replication forcefully while data transfer is in + // progress. + // Warning! if force is true, this will abort any current transfers + // and can lead to data loss due to partial transfer. + // If force is false, stop replication will fail while data transfer is in + // progress and you will need to retry later. + bool force = 2; +} + +// ResumeReplicationRequest resumes a stopped replication. +message ResumeReplicationRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// ReverseReplicationDirectionRequest reverses direction of replication. Source +// becomes destination and destination becomes source. +message ReverseReplicationDirectionRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto new file mode 100644 index 000000000000..a37ef7dd41d5 --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto @@ -0,0 +1,177 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "SnapshotProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListSnapshotsRequest lists snapshots. +message ListSnapshotsRequest { + // Required. The volume for which to retrieve snapshot information, + // in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Snapshot" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListSnapshotsResponse is the result of ListSnapshotsRequest. +message ListSnapshotsResponse { + // A list of snapshots in the project for the specified volume. + repeated Snapshot snapshots = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetSnapshotRequest gets the state of a snapshot. +message GetSnapshotRequest { + // Required. The snapshot resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; +} + +// CreateSnapshotRequest creates a snapshot. +message CreateSnapshotRequest { + // Required. The NetApp volume to create the snapshots of, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Snapshot" + } + ]; + + // Required. A snapshot resource + Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the snapshot to create. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteSnapshotRequest deletes a snapshot. +message DeleteSnapshotRequest { + // Required. The snapshot resource name, in the format + // `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; +} + +// UpdateSnapshotRequest updates description and/or labels for a snapshot. +message UpdateSnapshotRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A snapshot resource + Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Snapshot is a point-in-time version of a Volume's content. +message Snapshot { + option (google.api.resource) = { + type: "netapp.googleapis.com/Snapshot" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}" + }; + + // The Snapshot States + enum State { + // Unspecified Snapshot State + STATE_UNSPECIFIED = 0; + + // Snapshot State is Ready + READY = 1; + + // Snapshot State is Creating + CREATING = 2; + + // Snapshot State is Deleting + DELETING = 3; + + // Snapshot State is Updating + UPDATING = 4; + + // Snapshot State is Disabled + DISABLED = 5; + + // Snapshot State is Error + ERROR = 6; + } + + // Output only. The resource name of the snapshot. + // Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The snapshot state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the storage pool + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A description of the snapshot with 2048 characters or less. + // Requests with longer descriptions will be rejected. + string description = 4; + + // Output only. Current storage usage for the snapshot in bytes. + double used_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the snapshot was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 7; +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto new file mode 100644 index 000000000000..1dcdbacf113c --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto @@ -0,0 +1,222 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "StoragePoolProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// GetStoragePoolRequest gets a Storage Pool. +message GetStoragePoolRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; +} + +// ListStoragePoolsRequest lists Storage Pools. +message ListStoragePoolsRequest { + // Required. Parent value + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/StoragePool" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListStoragePoolsResponse is the response to a ListStoragePoolsRequest. +message ListStoragePoolsResponse { + // The list of StoragePools + repeated StoragePool storage_pools = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// CreateStoragePoolRequest creates a Storage Pool. +message CreateStoragePoolRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Required. Id of the requesting storage pool + // If auto-generating Id server-side, remove this field and + // id from the method_signature of Create RPC + string storage_pool_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The required parameters to create a new storage pool. + StoragePool storage_pool = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateStoragePoolRequest updates a Storage Pool. +message UpdateStoragePoolRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // StoragePool resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The pool being updated + StoragePool storage_pool = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteStoragePoolRequest deletes a Storage Pool. +message DeleteStoragePoolRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; +} + +// StoragePool is a container for volumes with a service level and capacity. +// Volumes can be created in a pool of sufficient available capacity. +// StoragePool capacity is what you are billed for. +message StoragePool { + option (google.api.resource) = { + type: "netapp.googleapis.com/StoragePool" + pattern: "projects/{project}/locations/{location}/storagePools/{storage_pool}" + }; + + // The Storage Pool States + enum State { + // Unspecified Storage Pool State + STATE_UNSPECIFIED = 0; + + // Storage Pool State is Ready + READY = 1; + + // Storage Pool State is Creating + CREATING = 2; + + // Storage Pool State is Deleting + DELETING = 3; + + // Storage Pool State is Updating + UPDATING = 4; + + // Storage Pool State is Restoring + RESTORING = 5; + + // Storage Pool State is Disabled + DISABLED = 6; + + // Storage Pool State is Error + ERROR = 7; + } + + // Output only. Name of the storage pool + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Service level of the storage pool + ServiceLevel service_level = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Capacity in GIB of the pool + int64 capacity_gib = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Allocated size of all volumes in GIB in the storage pool + int64 volume_capacity_gib = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Volume count of the storage pool + int32 volume_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the storage pool + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the storage pool + string state_details = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the storage pool + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the storage pool + string description = 9; + + // Labels as key value pairs + map labels = 10; + + // Required. VPC Network name. + // Format: projects/{project}/global/networks/{network} + string network = 11 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Specifies the Active Directory to be used for creating a SMB volume. + string active_directory = 12 [(google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + }]; + + // Specifies the KMS config to be used for volume encryption. + string kms_config = 13 [(google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + }]; + + // Flag indicating if the pool is NFS LDAP enabled or not. + bool ldap_enabled = 14; + + // Name of the Private Service Access allocated range. If + // not provided, any available range will be chosen. + string psa_range = 15; + + // Output only. Specifies the current pool encryption key source. + EncryptionType encryption_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Allows SO pool to access AD or DNS server from other regions. + optional bool global_access_allowed = 17 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto new file mode 100644 index 000000000000..b657dfa0d8e6 --- /dev/null +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto @@ -0,0 +1,540 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "VolumeProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +enum Protocols { + // Unspecified protocol + PROTOCOLS_UNSPECIFIED = 0; + + // NFS V3 protocol + NFSV3 = 1; + + // NFS V4 protocol + NFSV4 = 2; + + // SMB protocol + SMB = 3; +} + +enum AccessType { + // Unspecified Access Type + ACCESS_TYPE_UNSPECIFIED = 0; + + // Read Only + READ_ONLY = 1; + + // Read Write + READ_WRITE = 2; + + // None + READ_NONE = 3; +} + +// SMBSettings +// Modifies the behaviour of a SMB volume. +enum SMBSettings { + // Unspecified default option + SMB_SETTINGS_UNSPECIFIED = 0; + + // SMB setting encrypt data + ENCRYPT_DATA = 1; + + // SMB setting browsable + BROWSABLE = 2; + + // SMB setting notify change + CHANGE_NOTIFY = 3; + + // SMB setting not to notify change + NON_BROWSABLE = 4; + + // SMB setting oplocks + OPLOCKS = 5; + + // SMB setting to show snapshots + SHOW_SNAPSHOT = 6; + + // SMB setting to show previous versions + SHOW_PREVIOUS_VERSIONS = 7; + + // SMB setting to access volume based on enumerartion + ACCESS_BASED_ENUMERATION = 8; + + // Continuously available enumeration + CONTINUOUSLY_AVAILABLE = 9; +} + +// The security style of the volume, can be either UNIX or NTFS. +enum SecurityStyle { + // SecurityStyle is unspecified + SECURITY_STYLE_UNSPECIFIED = 0; + + // SecurityStyle uses NTFS + NTFS = 1; + + // SecurityStyle uses NTFS + UNIX = 2; +} + +// Actions to be restricted for a volume. +enum RestrictedAction { + // Unspecified restricted action + RESTRICTED_ACTION_UNSPECIFIED = 0; + + // Prevent volume from being deleted when mounted. + DELETE = 1; +} + +// Message for requesting list of Volumes +message ListVolumesRequest { + // Required. Parent value for ListVolumesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Volume" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Volumes +message ListVolumesResponse { + // The list of Volume + repeated Volume volumes = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Volume +message GetVolumeRequest { + // Required. Name of the volume + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; +} + +// Message for creating a Volume +message CreateVolumeRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Volume" + } + ]; + + // Required. Id of the requesting volume + // If auto-generating Id server-side, remove this field and + // Id from the method_signature of Create RPC + string volume_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being created. + Volume volume = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for updating a Volume +message UpdateVolumeRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Volume resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being updated + Volume volume = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for deleting a Volume +message DeleteVolumeRequest { + // Required. Name of the volume + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // If this field is set as true, CCFE will not block the volume resource + // deletion even if it has any snapshots resource. (Otherwise, the request + // will only work if the volume has no snapshots.) + bool force = 2; +} + +// RevertVolumeRequest reverts the given volume to the specified snapshot. +message RevertVolumeRequest { + // Required. The resource name of the volume, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Required. The snapshot resource ID, in the format 'my-snapshot', where the + // specified ID is the {snapshot_id} of the fully qualified name like + // projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + string snapshot_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Volume provides a filesystem that you can mount. +message Volume { + option (google.api.resource) = { + type: "netapp.googleapis.com/Volume" + pattern: "projects/{project}/locations/{location}/volumes/{volume}" + }; + + // The volume states + enum State { + // Unspecified Volume State + STATE_UNSPECIFIED = 0; + + // Volume State is Ready + READY = 1; + + // Volume State is Creating + CREATING = 2; + + // Volume State is Deleting + DELETING = 3; + + // Volume State is Updating + UPDATING = 4; + + // Volume State is Restoring + RESTORING = 5; + + // Volume State is Disabled + DISABLED = 6; + + // Volume State is Error + ERROR = 7; + } + + // Output only. Name of the volume + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the volume + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the volume + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the volume + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Share name of the volume + string share_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Name of the Private Service Access allocated range. This is + // optional. If not provided, any available range will be chosen. + string psa_range = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. StoragePool name of the volume + string storage_pool = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Output only. VPC Network name. + // Format: projects/{project}/global/networks/{network} + string network = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. Service level of the volume + ServiceLevel service_level = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Capacity in GIB of the volume + int64 capacity_gib = 10 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Export policy of the volume + ExportPolicy export_policy = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Protocols required for the volume + repeated Protocols protocols = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. SMB share settings for the volume. + repeated SMBSettings smb_settings = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Mount options of this volume + repeated MountOption mount_options = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Default unix style permission (e.g. 777) the mount point will be + // created with. Applicable for NFS protocol types only. + string unix_permissions = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels as key value pairs + map labels = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the volume + string description = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SnapshotPolicy for a volume. + SnapshotPolicy snapshot_policy = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Snap_reserve specifies percentage of volume storage reserved for + // snapshot storage. Default is 0 percent. + double snap_reserve = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Snapshot_directory if enabled (true) the volume will contain a + // read-only .snapshot directory which provides access to each of the volume's + // snapshots. + bool snapshot_directory = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Used capacity in GIB of the volume. This is computed + // periodically and it does not represent the realtime usage. + int64 used_gib = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Security Style of the Volume + SecurityStyle security_style = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating if the volume is a kerberos volume or not, export + // policy rules control kerberos security modes (krb5, krb5i, krb5p). + bool kerberos_enabled = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Flag indicating if the volume is NFS LDAP enabled or not. + bool ldap_enabled = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specifies the ActiveDirectory name of a SMB volume. + string active_directory = 25 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Optional. Specifies the source of the volume to be created from. + RestoreParameters restore_parameters = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Specifies the KMS config to be used for volume encryption. + string kms_config = 27 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Output only. Specified the current volume encryption key source. + EncryptionType encryption_type = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the volume is part of a replication + // relationship. + bool has_replication = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. List of actions that are restricted on this volume. + repeated RestrictedAction restricted_actions = 31 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Defines the export policy for the volume. +message ExportPolicy { + // Required. List of export policy rules + repeated SimpleExportPolicyRule rules = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// An export policy rule describing various export options. +message SimpleExportPolicyRule { + // Comma separated list of allowed clients IP addresses + optional string allowed_clients = 1; + + // Whether Unix root access will be granted. + optional string has_root_access = 2; + + // Access type (ReadWrite, ReadOnly, None) + optional AccessType access_type = 3; + + // NFS V3 protocol. + optional bool nfsv3 = 4; + + // NFS V4 protocol. + optional bool nfsv4 = 5; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'authentication' kerberos security mode. + optional bool kerberos_5_read_only = 6; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'authentication' kerberos security mode. The + // 'kerberos5ReadOnly' value be ignored if this is enabled. + optional bool kerberos_5_read_write = 7; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'integrity' kerberos security mode. + optional bool kerberos_5i_read_only = 8; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + // value be ignored if this is enabled. + optional bool kerberos_5i_read_write = 9; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'privacy' kerberos security mode. + optional bool kerberos_5p_read_only = 10; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + // value be ignored if this is enabled. + optional bool kerberos_5p_read_write = 11; +} + +// Snapshot Policy for a volume. +message SnapshotPolicy { + // If enabled, make snapshots automatically according to the schedules. + // Default is false. + optional bool enabled = 1; + + // Hourly schedule policy. + optional HourlySchedule hourly_schedule = 2; + + // Daily schedule policy. + optional DailySchedule daily_schedule = 3; + + // Weekly schedule policy. + optional WeeklySchedule weekly_schedule = 4; + + // Monthly schedule policy. + optional MonthlySchedule monthly_schedule = 5; +} + +// Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. +message HourlySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; +} + +// Make a snapshot every day e.g. at 04:00, 05:20, 23:50 +message DailySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; +} + +// Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday +// 23:50 +message WeeklySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; + + // Set the day or days of the week to make a snapshot. Accepts a comma + // separated days of the week. Defaults to 'Sunday'. + optional string day = 4; +} + +// Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50 +message MonthlySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; + + // Set the day or days of the month to make a snapshot (1-31). Accepts a + // comma separated number of days. Defaults to '1'. + optional string days_of_month = 4; +} + +// View only mount options for a volume. +message MountOption { + // Export string + string export = 1; + + // Full export string + string export_full = 2; + + // Protocol to mount with. + Protocols protocol = 3; + + // Instructions for mounting + string instructions = 4; +} + +// The RestoreParameters if volume is created from a snapshot or backup. +message RestoreParameters { + // The source that the volume is created from. + oneof source { + // Full name of the snapshot resource. + // Format: + // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + string source_snapshot = 1; + } +} diff --git a/packages/google-cloud-netapp/protos/protos.d.ts b/packages/google-cloud-netapp/protos/protos.d.ts new file mode 100644 index 000000000000..b1462f53e622 --- /dev/null +++ b/packages/google-cloud-netapp/protos/protos.d.ts @@ -0,0 +1,15237 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace netapp. */ + namespace netapp { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a ListActiveDirectoriesRequest. */ + interface IListActiveDirectoriesRequest { + + /** ListActiveDirectoriesRequest parent */ + parent?: (string|null); + + /** ListActiveDirectoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListActiveDirectoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListActiveDirectoriesRequest filter */ + filter?: (string|null); + + /** ListActiveDirectoriesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListActiveDirectoriesRequest. */ + class ListActiveDirectoriesRequest implements IListActiveDirectoriesRequest { + + /** + * Constructs a new ListActiveDirectoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListActiveDirectoriesRequest); + + /** ListActiveDirectoriesRequest parent. */ + public parent: string; + + /** ListActiveDirectoriesRequest pageSize. */ + public pageSize: number; + + /** ListActiveDirectoriesRequest pageToken. */ + public pageToken: string; + + /** ListActiveDirectoriesRequest filter. */ + public filter: string; + + /** ListActiveDirectoriesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListActiveDirectoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActiveDirectoriesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListActiveDirectoriesRequest): google.cloud.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Encodes the specified ListActiveDirectoriesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @param message ListActiveDirectoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListActiveDirectoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListActiveDirectoriesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @param message ListActiveDirectoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListActiveDirectoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActiveDirectoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActiveDirectoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Verifies a ListActiveDirectoriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListActiveDirectoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActiveDirectoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Creates a plain object from a ListActiveDirectoriesRequest message. Also converts values to other types if specified. + * @param message ListActiveDirectoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListActiveDirectoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListActiveDirectoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListActiveDirectoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListActiveDirectoriesResponse. */ + interface IListActiveDirectoriesResponse { + + /** ListActiveDirectoriesResponse activeDirectories */ + activeDirectories?: (google.cloud.netapp.v1.IActiveDirectory[]|null); + + /** ListActiveDirectoriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListActiveDirectoriesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListActiveDirectoriesResponse. */ + class ListActiveDirectoriesResponse implements IListActiveDirectoriesResponse { + + /** + * Constructs a new ListActiveDirectoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListActiveDirectoriesResponse); + + /** ListActiveDirectoriesResponse activeDirectories. */ + public activeDirectories: google.cloud.netapp.v1.IActiveDirectory[]; + + /** ListActiveDirectoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListActiveDirectoriesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListActiveDirectoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActiveDirectoriesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListActiveDirectoriesResponse): google.cloud.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Encodes the specified ListActiveDirectoriesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @param message ListActiveDirectoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListActiveDirectoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListActiveDirectoriesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @param message ListActiveDirectoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListActiveDirectoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActiveDirectoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActiveDirectoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Verifies a ListActiveDirectoriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListActiveDirectoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActiveDirectoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Creates a plain object from a ListActiveDirectoriesResponse message. Also converts values to other types if specified. + * @param message ListActiveDirectoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListActiveDirectoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListActiveDirectoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListActiveDirectoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetActiveDirectoryRequest. */ + interface IGetActiveDirectoryRequest { + + /** GetActiveDirectoryRequest name */ + name?: (string|null); + } + + /** Represents a GetActiveDirectoryRequest. */ + class GetActiveDirectoryRequest implements IGetActiveDirectoryRequest { + + /** + * Constructs a new GetActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetActiveDirectoryRequest); + + /** GetActiveDirectoryRequest name. */ + public name: string; + + /** + * Creates a new GetActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetActiveDirectoryRequest): google.cloud.netapp.v1.GetActiveDirectoryRequest; + + /** + * Encodes the specified GetActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @param message GetActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @param message GetActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.GetActiveDirectoryRequest; + + /** + * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.GetActiveDirectoryRequest; + + /** + * Verifies a GetActiveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetActiveDirectoryRequest; + + /** + * Creates a plain object from a GetActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message GetActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateActiveDirectoryRequest. */ + interface ICreateActiveDirectoryRequest { + + /** CreateActiveDirectoryRequest parent */ + parent?: (string|null); + + /** CreateActiveDirectoryRequest activeDirectory */ + activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + + /** CreateActiveDirectoryRequest activeDirectoryId */ + activeDirectoryId?: (string|null); + } + + /** Represents a CreateActiveDirectoryRequest. */ + class CreateActiveDirectoryRequest implements ICreateActiveDirectoryRequest { + + /** + * Constructs a new CreateActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateActiveDirectoryRequest); + + /** CreateActiveDirectoryRequest parent. */ + public parent: string; + + /** CreateActiveDirectoryRequest activeDirectory. */ + public activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + + /** CreateActiveDirectoryRequest activeDirectoryId. */ + public activeDirectoryId: string; + + /** + * Creates a new CreateActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateActiveDirectoryRequest): google.cloud.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Encodes the specified CreateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @param message CreateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @param message CreateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Verifies a CreateActiveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Creates a plain object from a CreateActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message CreateActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateActiveDirectoryRequest. */ + interface IUpdateActiveDirectoryRequest { + + /** UpdateActiveDirectoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateActiveDirectoryRequest activeDirectory */ + activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + } + + /** Represents an UpdateActiveDirectoryRequest. */ + class UpdateActiveDirectoryRequest implements IUpdateActiveDirectoryRequest { + + /** + * Constructs a new UpdateActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest); + + /** UpdateActiveDirectoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateActiveDirectoryRequest activeDirectory. */ + public activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + + /** + * Creates a new UpdateActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @param message UpdateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @param message UpdateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Verifies an UpdateActiveDirectoryRequest message. + * @param message Plain 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 UpdateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Creates a plain object from an UpdateActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message UpdateActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteActiveDirectoryRequest. */ + interface IDeleteActiveDirectoryRequest { + + /** DeleteActiveDirectoryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteActiveDirectoryRequest. */ + class DeleteActiveDirectoryRequest implements IDeleteActiveDirectoryRequest { + + /** + * Constructs a new DeleteActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest); + + /** DeleteActiveDirectoryRequest name. */ + public name: string; + + /** + * Creates a new DeleteActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Encodes the specified DeleteActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @param message DeleteActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @param message DeleteActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Verifies a DeleteActiveDirectoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Creates a plain object from a DeleteActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message DeleteActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActiveDirectory. */ + interface IActiveDirectory { + + /** ActiveDirectory name */ + name?: (string|null); + + /** ActiveDirectory createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ActiveDirectory state */ + state?: (google.cloud.netapp.v1.ActiveDirectory.State|keyof typeof google.cloud.netapp.v1.ActiveDirectory.State|null); + + /** ActiveDirectory domain */ + domain?: (string|null); + + /** ActiveDirectory site */ + site?: (string|null); + + /** ActiveDirectory dns */ + dns?: (string|null); + + /** ActiveDirectory netBiosPrefix */ + netBiosPrefix?: (string|null); + + /** ActiveDirectory organizationalUnit */ + organizationalUnit?: (string|null); + + /** ActiveDirectory aesEncryption */ + aesEncryption?: (boolean|null); + + /** ActiveDirectory username */ + username?: (string|null); + + /** ActiveDirectory password */ + password?: (string|null); + + /** ActiveDirectory backupOperators */ + backupOperators?: (string[]|null); + + /** ActiveDirectory securityOperators */ + securityOperators?: (string[]|null); + + /** ActiveDirectory kdcHostname */ + kdcHostname?: (string|null); + + /** ActiveDirectory kdcIp */ + kdcIp?: (string|null); + + /** ActiveDirectory nfsUsersWithLdap */ + nfsUsersWithLdap?: (boolean|null); + + /** ActiveDirectory description */ + description?: (string|null); + + /** ActiveDirectory ldapSigning */ + ldapSigning?: (boolean|null); + + /** ActiveDirectory encryptDcConnections */ + encryptDcConnections?: (boolean|null); + + /** ActiveDirectory labels */ + labels?: ({ [k: string]: string }|null); + + /** ActiveDirectory stateDetails */ + stateDetails?: (string|null); + } + + /** Represents an ActiveDirectory. */ + class ActiveDirectory implements IActiveDirectory { + + /** + * Constructs a new ActiveDirectory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IActiveDirectory); + + /** ActiveDirectory name. */ + public name: string; + + /** ActiveDirectory createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ActiveDirectory state. */ + public state: (google.cloud.netapp.v1.ActiveDirectory.State|keyof typeof google.cloud.netapp.v1.ActiveDirectory.State); + + /** ActiveDirectory domain. */ + public domain: string; + + /** ActiveDirectory site. */ + public site: string; + + /** ActiveDirectory dns. */ + public dns: string; + + /** ActiveDirectory netBiosPrefix. */ + public netBiosPrefix: string; + + /** ActiveDirectory organizationalUnit. */ + public organizationalUnit: string; + + /** ActiveDirectory aesEncryption. */ + public aesEncryption: boolean; + + /** ActiveDirectory username. */ + public username: string; + + /** ActiveDirectory password. */ + public password: string; + + /** ActiveDirectory backupOperators. */ + public backupOperators: string[]; + + /** ActiveDirectory securityOperators. */ + public securityOperators: string[]; + + /** ActiveDirectory kdcHostname. */ + public kdcHostname: string; + + /** ActiveDirectory kdcIp. */ + public kdcIp: string; + + /** ActiveDirectory nfsUsersWithLdap. */ + public nfsUsersWithLdap: boolean; + + /** ActiveDirectory description. */ + public description: string; + + /** ActiveDirectory ldapSigning. */ + public ldapSigning: boolean; + + /** ActiveDirectory encryptDcConnections. */ + public encryptDcConnections: boolean; + + /** ActiveDirectory labels. */ + public labels: { [k: string]: string }; + + /** ActiveDirectory stateDetails. */ + public stateDetails: string; + + /** + * Creates a new ActiveDirectory instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveDirectory instance + */ + public static create(properties?: google.cloud.netapp.v1.IActiveDirectory): google.cloud.netapp.v1.ActiveDirectory; + + /** + * Encodes the specified ActiveDirectory message. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @param message ActiveDirectory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IActiveDirectory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveDirectory message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @param message ActiveDirectory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IActiveDirectory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveDirectory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ActiveDirectory; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveDirectory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ActiveDirectory; + + /** + * Verifies an ActiveDirectory message. + * @param message Plain 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 ActiveDirectory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveDirectory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ActiveDirectory; + + /** + * Creates a plain object from an ActiveDirectory message. Also converts values to other types if specified. + * @param message ActiveDirectory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ActiveDirectory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveDirectory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveDirectory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ActiveDirectory { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + IN_USE = 4, + DELETING = 5, + ERROR = 6 + } + } + + /** Represents a NetApp */ + class NetApp extends $protobuf.rpc.Service { + + /** + * Constructs a new NetApp 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 NetApp 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): NetApp; + + /** + * Calls ListStoragePools. + * @param request ListStoragePoolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListStoragePoolsResponse + */ + public listStoragePools(request: google.cloud.netapp.v1.IListStoragePoolsRequest, callback: google.cloud.netapp.v1.NetApp.ListStoragePoolsCallback): void; + + /** + * Calls ListStoragePools. + * @param request ListStoragePoolsRequest message or plain object + * @returns Promise + */ + public listStoragePools(request: google.cloud.netapp.v1.IListStoragePoolsRequest): Promise; + + /** + * Calls CreateStoragePool. + * @param request CreateStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createStoragePool(request: google.cloud.netapp.v1.ICreateStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.CreateStoragePoolCallback): void; + + /** + * Calls CreateStoragePool. + * @param request CreateStoragePoolRequest message or plain object + * @returns Promise + */ + public createStoragePool(request: google.cloud.netapp.v1.ICreateStoragePoolRequest): Promise; + + /** + * Calls GetStoragePool. + * @param request GetStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StoragePool + */ + public getStoragePool(request: google.cloud.netapp.v1.IGetStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.GetStoragePoolCallback): void; + + /** + * Calls GetStoragePool. + * @param request GetStoragePoolRequest message or plain object + * @returns Promise + */ + public getStoragePool(request: google.cloud.netapp.v1.IGetStoragePoolRequest): Promise; + + /** + * Calls UpdateStoragePool. + * @param request UpdateStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateStoragePool(request: google.cloud.netapp.v1.IUpdateStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.UpdateStoragePoolCallback): void; + + /** + * Calls UpdateStoragePool. + * @param request UpdateStoragePoolRequest message or plain object + * @returns Promise + */ + public updateStoragePool(request: google.cloud.netapp.v1.IUpdateStoragePoolRequest): Promise; + + /** + * Calls DeleteStoragePool. + * @param request DeleteStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteStoragePool(request: google.cloud.netapp.v1.IDeleteStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.DeleteStoragePoolCallback): void; + + /** + * Calls DeleteStoragePool. + * @param request DeleteStoragePoolRequest message or plain object + * @returns Promise + */ + public deleteStoragePool(request: google.cloud.netapp.v1.IDeleteStoragePoolRequest): Promise; + + /** + * Calls ListVolumes. + * @param request ListVolumesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVolumesResponse + */ + public listVolumes(request: google.cloud.netapp.v1.IListVolumesRequest, callback: google.cloud.netapp.v1.NetApp.ListVolumesCallback): void; + + /** + * Calls ListVolumes. + * @param request ListVolumesRequest message or plain object + * @returns Promise + */ + public listVolumes(request: google.cloud.netapp.v1.IListVolumesRequest): Promise; + + /** + * Calls GetVolume. + * @param request GetVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Volume + */ + public getVolume(request: google.cloud.netapp.v1.IGetVolumeRequest, callback: google.cloud.netapp.v1.NetApp.GetVolumeCallback): void; + + /** + * Calls GetVolume. + * @param request GetVolumeRequest message or plain object + * @returns Promise + */ + public getVolume(request: google.cloud.netapp.v1.IGetVolumeRequest): Promise; + + /** + * Calls CreateVolume. + * @param request CreateVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createVolume(request: google.cloud.netapp.v1.ICreateVolumeRequest, callback: google.cloud.netapp.v1.NetApp.CreateVolumeCallback): void; + + /** + * Calls CreateVolume. + * @param request CreateVolumeRequest message or plain object + * @returns Promise + */ + public createVolume(request: google.cloud.netapp.v1.ICreateVolumeRequest): Promise; + + /** + * Calls UpdateVolume. + * @param request UpdateVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateVolume(request: google.cloud.netapp.v1.IUpdateVolumeRequest, callback: google.cloud.netapp.v1.NetApp.UpdateVolumeCallback): void; + + /** + * Calls UpdateVolume. + * @param request UpdateVolumeRequest message or plain object + * @returns Promise + */ + public updateVolume(request: google.cloud.netapp.v1.IUpdateVolumeRequest): Promise; + + /** + * Calls DeleteVolume. + * @param request DeleteVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteVolume(request: google.cloud.netapp.v1.IDeleteVolumeRequest, callback: google.cloud.netapp.v1.NetApp.DeleteVolumeCallback): void; + + /** + * Calls DeleteVolume. + * @param request DeleteVolumeRequest message or plain object + * @returns Promise + */ + public deleteVolume(request: google.cloud.netapp.v1.IDeleteVolumeRequest): Promise; + + /** + * Calls RevertVolume. + * @param request RevertVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public revertVolume(request: google.cloud.netapp.v1.IRevertVolumeRequest, callback: google.cloud.netapp.v1.NetApp.RevertVolumeCallback): void; + + /** + * Calls RevertVolume. + * @param request RevertVolumeRequest message or plain object + * @returns Promise + */ + public revertVolume(request: google.cloud.netapp.v1.IRevertVolumeRequest): Promise; + + /** + * Calls ListSnapshots. + * @param request ListSnapshotsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSnapshotsResponse + */ + public listSnapshots(request: google.cloud.netapp.v1.IListSnapshotsRequest, callback: google.cloud.netapp.v1.NetApp.ListSnapshotsCallback): void; + + /** + * Calls ListSnapshots. + * @param request ListSnapshotsRequest message or plain object + * @returns Promise + */ + public listSnapshots(request: google.cloud.netapp.v1.IListSnapshotsRequest): Promise; + + /** + * Calls GetSnapshot. + * @param request GetSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Snapshot + */ + public getSnapshot(request: google.cloud.netapp.v1.IGetSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.GetSnapshotCallback): void; + + /** + * Calls GetSnapshot. + * @param request GetSnapshotRequest message or plain object + * @returns Promise + */ + public getSnapshot(request: google.cloud.netapp.v1.IGetSnapshotRequest): Promise; + + /** + * Calls CreateSnapshot. + * @param request CreateSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createSnapshot(request: google.cloud.netapp.v1.ICreateSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.CreateSnapshotCallback): void; + + /** + * Calls CreateSnapshot. + * @param request CreateSnapshotRequest message or plain object + * @returns Promise + */ + public createSnapshot(request: google.cloud.netapp.v1.ICreateSnapshotRequest): Promise; + + /** + * Calls DeleteSnapshot. + * @param request DeleteSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteSnapshot(request: google.cloud.netapp.v1.IDeleteSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.DeleteSnapshotCallback): void; + + /** + * Calls DeleteSnapshot. + * @param request DeleteSnapshotRequest message or plain object + * @returns Promise + */ + public deleteSnapshot(request: google.cloud.netapp.v1.IDeleteSnapshotRequest): Promise; + + /** + * Calls UpdateSnapshot. + * @param request UpdateSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateSnapshot(request: google.cloud.netapp.v1.IUpdateSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.UpdateSnapshotCallback): void; + + /** + * Calls UpdateSnapshot. + * @param request UpdateSnapshotRequest message or plain object + * @returns Promise + */ + public updateSnapshot(request: google.cloud.netapp.v1.IUpdateSnapshotRequest): Promise; + + /** + * Calls ListActiveDirectories. + * @param request ListActiveDirectoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActiveDirectoriesResponse + */ + public listActiveDirectories(request: google.cloud.netapp.v1.IListActiveDirectoriesRequest, callback: google.cloud.netapp.v1.NetApp.ListActiveDirectoriesCallback): void; + + /** + * Calls ListActiveDirectories. + * @param request ListActiveDirectoriesRequest message or plain object + * @returns Promise + */ + public listActiveDirectories(request: google.cloud.netapp.v1.IListActiveDirectoriesRequest): Promise; + + /** + * Calls GetActiveDirectory. + * @param request GetActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ActiveDirectory + */ + public getActiveDirectory(request: google.cloud.netapp.v1.IGetActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.GetActiveDirectoryCallback): void; + + /** + * Calls GetActiveDirectory. + * @param request GetActiveDirectoryRequest message or plain object + * @returns Promise + */ + public getActiveDirectory(request: google.cloud.netapp.v1.IGetActiveDirectoryRequest): Promise; + + /** + * Calls CreateActiveDirectory. + * @param request CreateActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createActiveDirectory(request: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.CreateActiveDirectoryCallback): void; + + /** + * Calls CreateActiveDirectory. + * @param request CreateActiveDirectoryRequest message or plain object + * @returns Promise + */ + public createActiveDirectory(request: google.cloud.netapp.v1.ICreateActiveDirectoryRequest): Promise; + + /** + * Calls UpdateActiveDirectory. + * @param request UpdateActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateActiveDirectory(request: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.UpdateActiveDirectoryCallback): void; + + /** + * Calls UpdateActiveDirectory. + * @param request UpdateActiveDirectoryRequest message or plain object + * @returns Promise + */ + public updateActiveDirectory(request: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest): Promise; + + /** + * Calls DeleteActiveDirectory. + * @param request DeleteActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteActiveDirectory(request: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.DeleteActiveDirectoryCallback): void; + + /** + * Calls DeleteActiveDirectory. + * @param request DeleteActiveDirectoryRequest message or plain object + * @returns Promise + */ + public deleteActiveDirectory(request: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest): Promise; + + /** + * Calls ListKmsConfigs. + * @param request ListKmsConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListKmsConfigsResponse + */ + public listKmsConfigs(request: google.cloud.netapp.v1.IListKmsConfigsRequest, callback: google.cloud.netapp.v1.NetApp.ListKmsConfigsCallback): void; + + /** + * Calls ListKmsConfigs. + * @param request ListKmsConfigsRequest message or plain object + * @returns Promise + */ + public listKmsConfigs(request: google.cloud.netapp.v1.IListKmsConfigsRequest): Promise; + + /** + * Calls CreateKmsConfig. + * @param request CreateKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createKmsConfig(request: google.cloud.netapp.v1.ICreateKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.CreateKmsConfigCallback): void; + + /** + * Calls CreateKmsConfig. + * @param request CreateKmsConfigRequest message or plain object + * @returns Promise + */ + public createKmsConfig(request: google.cloud.netapp.v1.ICreateKmsConfigRequest): Promise; + + /** + * Calls GetKmsConfig. + * @param request GetKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and KmsConfig + */ + public getKmsConfig(request: google.cloud.netapp.v1.IGetKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.GetKmsConfigCallback): void; + + /** + * Calls GetKmsConfig. + * @param request GetKmsConfigRequest message or plain object + * @returns Promise + */ + public getKmsConfig(request: google.cloud.netapp.v1.IGetKmsConfigRequest): Promise; + + /** + * Calls UpdateKmsConfig. + * @param request UpdateKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateKmsConfig(request: google.cloud.netapp.v1.IUpdateKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.UpdateKmsConfigCallback): void; + + /** + * Calls UpdateKmsConfig. + * @param request UpdateKmsConfigRequest message or plain object + * @returns Promise + */ + public updateKmsConfig(request: google.cloud.netapp.v1.IUpdateKmsConfigRequest): Promise; + + /** + * Calls EncryptVolumes. + * @param request EncryptVolumesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public encryptVolumes(request: google.cloud.netapp.v1.IEncryptVolumesRequest, callback: google.cloud.netapp.v1.NetApp.EncryptVolumesCallback): void; + + /** + * Calls EncryptVolumes. + * @param request EncryptVolumesRequest message or plain object + * @returns Promise + */ + public encryptVolumes(request: google.cloud.netapp.v1.IEncryptVolumesRequest): Promise; + + /** + * Calls VerifyKmsConfig. + * @param request VerifyKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VerifyKmsConfigResponse + */ + public verifyKmsConfig(request: google.cloud.netapp.v1.IVerifyKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.VerifyKmsConfigCallback): void; + + /** + * Calls VerifyKmsConfig. + * @param request VerifyKmsConfigRequest message or plain object + * @returns Promise + */ + public verifyKmsConfig(request: google.cloud.netapp.v1.IVerifyKmsConfigRequest): Promise; + + /** + * Calls DeleteKmsConfig. + * @param request DeleteKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteKmsConfig(request: google.cloud.netapp.v1.IDeleteKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.DeleteKmsConfigCallback): void; + + /** + * Calls DeleteKmsConfig. + * @param request DeleteKmsConfigRequest message or plain object + * @returns Promise + */ + public deleteKmsConfig(request: google.cloud.netapp.v1.IDeleteKmsConfigRequest): Promise; + + /** + * Calls ListReplications. + * @param request ListReplicationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReplicationsResponse + */ + public listReplications(request: google.cloud.netapp.v1.IListReplicationsRequest, callback: google.cloud.netapp.v1.NetApp.ListReplicationsCallback): void; + + /** + * Calls ListReplications. + * @param request ListReplicationsRequest message or plain object + * @returns Promise + */ + public listReplications(request: google.cloud.netapp.v1.IListReplicationsRequest): Promise; + + /** + * Calls GetReplication. + * @param request GetReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Replication + */ + public getReplication(request: google.cloud.netapp.v1.IGetReplicationRequest, callback: google.cloud.netapp.v1.NetApp.GetReplicationCallback): void; + + /** + * Calls GetReplication. + * @param request GetReplicationRequest message or plain object + * @returns Promise + */ + public getReplication(request: google.cloud.netapp.v1.IGetReplicationRequest): Promise; + + /** + * Calls CreateReplication. + * @param request CreateReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createReplication(request: google.cloud.netapp.v1.ICreateReplicationRequest, callback: google.cloud.netapp.v1.NetApp.CreateReplicationCallback): void; + + /** + * Calls CreateReplication. + * @param request CreateReplicationRequest message or plain object + * @returns Promise + */ + public createReplication(request: google.cloud.netapp.v1.ICreateReplicationRequest): Promise; + + /** + * Calls DeleteReplication. + * @param request DeleteReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteReplication(request: google.cloud.netapp.v1.IDeleteReplicationRequest, callback: google.cloud.netapp.v1.NetApp.DeleteReplicationCallback): void; + + /** + * Calls DeleteReplication. + * @param request DeleteReplicationRequest message or plain object + * @returns Promise + */ + public deleteReplication(request: google.cloud.netapp.v1.IDeleteReplicationRequest): Promise; + + /** + * Calls UpdateReplication. + * @param request UpdateReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateReplication(request: google.cloud.netapp.v1.IUpdateReplicationRequest, callback: google.cloud.netapp.v1.NetApp.UpdateReplicationCallback): void; + + /** + * Calls UpdateReplication. + * @param request UpdateReplicationRequest message or plain object + * @returns Promise + */ + public updateReplication(request: google.cloud.netapp.v1.IUpdateReplicationRequest): Promise; + + /** + * Calls StopReplication. + * @param request StopReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public stopReplication(request: google.cloud.netapp.v1.IStopReplicationRequest, callback: google.cloud.netapp.v1.NetApp.StopReplicationCallback): void; + + /** + * Calls StopReplication. + * @param request StopReplicationRequest message or plain object + * @returns Promise + */ + public stopReplication(request: google.cloud.netapp.v1.IStopReplicationRequest): Promise; + + /** + * Calls ResumeReplication. + * @param request ResumeReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public resumeReplication(request: google.cloud.netapp.v1.IResumeReplicationRequest, callback: google.cloud.netapp.v1.NetApp.ResumeReplicationCallback): void; + + /** + * Calls ResumeReplication. + * @param request ResumeReplicationRequest message or plain object + * @returns Promise + */ + public resumeReplication(request: google.cloud.netapp.v1.IResumeReplicationRequest): Promise; + + /** + * Calls ReverseReplicationDirection. + * @param request ReverseReplicationDirectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public reverseReplicationDirection(request: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, callback: google.cloud.netapp.v1.NetApp.ReverseReplicationDirectionCallback): void; + + /** + * Calls ReverseReplicationDirection. + * @param request ReverseReplicationDirectionRequest message or plain object + * @returns Promise + */ + public reverseReplicationDirection(request: google.cloud.netapp.v1.IReverseReplicationDirectionRequest): Promise; + } + + namespace NetApp { + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listStoragePools}. + * @param error Error, if any + * @param [response] ListStoragePoolsResponse + */ + type ListStoragePoolsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListStoragePoolsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createStoragePool}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getStoragePool}. + * @param error Error, if any + * @param [response] StoragePool + */ + type GetStoragePoolCallback = (error: (Error|null), response?: google.cloud.netapp.v1.StoragePool) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateStoragePool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteStoragePool}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listVolumes}. + * @param error Error, if any + * @param [response] ListVolumesResponse + */ + type ListVolumesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListVolumesResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getVolume}. + * @param error Error, if any + * @param [response] Volume + */ + type GetVolumeCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Volume) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|revertVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type RevertVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. + * @param error Error, if any + * @param [response] ListSnapshotsResponse + */ + type ListSnapshotsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListSnapshotsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getSnapshot}. + * @param error Error, if any + * @param [response] Snapshot + */ + type GetSnapshotCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Snapshot) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listActiveDirectories}. + * @param error Error, if any + * @param [response] ListActiveDirectoriesResponse + */ + type ListActiveDirectoriesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListActiveDirectoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getActiveDirectory}. + * @param error Error, if any + * @param [response] ActiveDirectory + */ + type GetActiveDirectoryCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ActiveDirectory) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createActiveDirectory}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateActiveDirectory}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteActiveDirectory}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listKmsConfigs}. + * @param error Error, if any + * @param [response] ListKmsConfigsResponse + */ + type ListKmsConfigsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListKmsConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createKmsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getKmsConfig}. + * @param error Error, if any + * @param [response] KmsConfig + */ + type GetKmsConfigCallback = (error: (Error|null), response?: google.cloud.netapp.v1.KmsConfig) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateKmsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|encryptVolumes}. + * @param error Error, if any + * @param [response] Operation + */ + type EncryptVolumesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|verifyKmsConfig}. + * @param error Error, if any + * @param [response] VerifyKmsConfigResponse + */ + type VerifyKmsConfigCallback = (error: (Error|null), response?: google.cloud.netapp.v1.VerifyKmsConfigResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteKmsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listReplications}. + * @param error Error, if any + * @param [response] ListReplicationsResponse + */ + type ListReplicationsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListReplicationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getReplication}. + * @param error Error, if any + * @param [response] Replication + */ + type GetReplicationCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Replication) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|stopReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type StopReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|resumeReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type ResumeReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|reverseReplicationDirection}. + * @param error Error, if any + * @param [response] Operation + */ + type ReverseReplicationDirectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.netapp.v1.IOperationMetadata): google.cloud.netapp.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetKmsConfigRequest. */ + interface IGetKmsConfigRequest { + + /** GetKmsConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetKmsConfigRequest. */ + class GetKmsConfigRequest implements IGetKmsConfigRequest { + + /** + * Constructs a new GetKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetKmsConfigRequest); + + /** GetKmsConfigRequest name. */ + public name: string; + + /** + * Creates a new GetKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetKmsConfigRequest): google.cloud.netapp.v1.GetKmsConfigRequest; + + /** + * Encodes the specified GetKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @param message GetKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @param message GetKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.GetKmsConfigRequest; + + /** + * Decodes a GetKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.GetKmsConfigRequest; + + /** + * Verifies a GetKmsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetKmsConfigRequest; + + /** + * Creates a plain object from a GetKmsConfigRequest message. Also converts values to other types if specified. + * @param message GetKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListKmsConfigsRequest. */ + interface IListKmsConfigsRequest { + + /** ListKmsConfigsRequest parent */ + parent?: (string|null); + + /** ListKmsConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListKmsConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListKmsConfigsRequest orderBy */ + orderBy?: (string|null); + + /** ListKmsConfigsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListKmsConfigsRequest. */ + class ListKmsConfigsRequest implements IListKmsConfigsRequest { + + /** + * Constructs a new ListKmsConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListKmsConfigsRequest); + + /** ListKmsConfigsRequest parent. */ + public parent: string; + + /** ListKmsConfigsRequest pageSize. */ + public pageSize: number; + + /** ListKmsConfigsRequest pageToken. */ + public pageToken: string; + + /** ListKmsConfigsRequest orderBy. */ + public orderBy: string; + + /** ListKmsConfigsRequest filter. */ + public filter: string; + + /** + * Creates a new ListKmsConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListKmsConfigsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListKmsConfigsRequest): google.cloud.netapp.v1.ListKmsConfigsRequest; + + /** + * Encodes the specified ListKmsConfigsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @param message ListKmsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListKmsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListKmsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @param message ListKmsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListKmsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListKmsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListKmsConfigsRequest; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListKmsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListKmsConfigsRequest; + + /** + * Verifies a ListKmsConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListKmsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListKmsConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListKmsConfigsRequest; + + /** + * Creates a plain object from a ListKmsConfigsRequest message. Also converts values to other types if specified. + * @param message ListKmsConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListKmsConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListKmsConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListKmsConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListKmsConfigsResponse. */ + interface IListKmsConfigsResponse { + + /** ListKmsConfigsResponse kmsConfigs */ + kmsConfigs?: (google.cloud.netapp.v1.IKmsConfig[]|null); + + /** ListKmsConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListKmsConfigsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListKmsConfigsResponse. */ + class ListKmsConfigsResponse implements IListKmsConfigsResponse { + + /** + * Constructs a new ListKmsConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListKmsConfigsResponse); + + /** ListKmsConfigsResponse kmsConfigs. */ + public kmsConfigs: google.cloud.netapp.v1.IKmsConfig[]; + + /** ListKmsConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListKmsConfigsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListKmsConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListKmsConfigsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListKmsConfigsResponse): google.cloud.netapp.v1.ListKmsConfigsResponse; + + /** + * Encodes the specified ListKmsConfigsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @param message ListKmsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListKmsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListKmsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @param message ListKmsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListKmsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListKmsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListKmsConfigsResponse; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListKmsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListKmsConfigsResponse; + + /** + * Verifies a ListKmsConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListKmsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListKmsConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListKmsConfigsResponse; + + /** + * Creates a plain object from a ListKmsConfigsResponse message. Also converts values to other types if specified. + * @param message ListKmsConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListKmsConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListKmsConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListKmsConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateKmsConfigRequest. */ + interface ICreateKmsConfigRequest { + + /** CreateKmsConfigRequest parent */ + parent?: (string|null); + + /** CreateKmsConfigRequest kmsConfigId */ + kmsConfigId?: (string|null); + + /** CreateKmsConfigRequest kmsConfig */ + kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + } + + /** Represents a CreateKmsConfigRequest. */ + class CreateKmsConfigRequest implements ICreateKmsConfigRequest { + + /** + * Constructs a new CreateKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateKmsConfigRequest); + + /** CreateKmsConfigRequest parent. */ + public parent: string; + + /** CreateKmsConfigRequest kmsConfigId. */ + public kmsConfigId: string; + + /** CreateKmsConfigRequest kmsConfig. */ + public kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + + /** + * Creates a new CreateKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateKmsConfigRequest): google.cloud.netapp.v1.CreateKmsConfigRequest; + + /** + * Encodes the specified CreateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @param message CreateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @param message CreateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.CreateKmsConfigRequest; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.CreateKmsConfigRequest; + + /** + * Verifies a CreateKmsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateKmsConfigRequest; + + /** + * Creates a plain object from a CreateKmsConfigRequest message. Also converts values to other types if specified. + * @param message CreateKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateKmsConfigRequest. */ + interface IUpdateKmsConfigRequest { + + /** UpdateKmsConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateKmsConfigRequest kmsConfig */ + kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + } + + /** Represents an UpdateKmsConfigRequest. */ + class UpdateKmsConfigRequest implements IUpdateKmsConfigRequest { + + /** + * Constructs a new UpdateKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateKmsConfigRequest); + + /** UpdateKmsConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateKmsConfigRequest kmsConfig. */ + public kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + + /** + * Creates a new UpdateKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateKmsConfigRequest): google.cloud.netapp.v1.UpdateKmsConfigRequest; + + /** + * Encodes the specified UpdateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @param message UpdateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @param message UpdateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.UpdateKmsConfigRequest; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.UpdateKmsConfigRequest; + + /** + * Verifies an UpdateKmsConfigRequest message. + * @param message Plain 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 UpdateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateKmsConfigRequest; + + /** + * Creates a plain object from an UpdateKmsConfigRequest message. Also converts values to other types if specified. + * @param message UpdateKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteKmsConfigRequest. */ + interface IDeleteKmsConfigRequest { + + /** DeleteKmsConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteKmsConfigRequest. */ + class DeleteKmsConfigRequest implements IDeleteKmsConfigRequest { + + /** + * Constructs a new DeleteKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteKmsConfigRequest); + + /** DeleteKmsConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteKmsConfigRequest): google.cloud.netapp.v1.DeleteKmsConfigRequest; + + /** + * Encodes the specified DeleteKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @param message DeleteKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @param message DeleteKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DeleteKmsConfigRequest; + + /** + * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DeleteKmsConfigRequest; + + /** + * Verifies a DeleteKmsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteKmsConfigRequest; + + /** + * Creates a plain object from a DeleteKmsConfigRequest message. Also converts values to other types if specified. + * @param message DeleteKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptVolumesRequest. */ + interface IEncryptVolumesRequest { + + /** EncryptVolumesRequest name */ + name?: (string|null); + } + + /** Represents an EncryptVolumesRequest. */ + class EncryptVolumesRequest implements IEncryptVolumesRequest { + + /** + * Constructs a new EncryptVolumesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IEncryptVolumesRequest); + + /** EncryptVolumesRequest name. */ + public name: string; + + /** + * Creates a new EncryptVolumesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptVolumesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IEncryptVolumesRequest): google.cloud.netapp.v1.EncryptVolumesRequest; + + /** + * Encodes the specified EncryptVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @param message EncryptVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IEncryptVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @param message EncryptVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IEncryptVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptVolumesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.EncryptVolumesRequest; + + /** + * Decodes an EncryptVolumesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.EncryptVolumesRequest; + + /** + * Verifies an EncryptVolumesRequest message. + * @param message Plain 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 EncryptVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptVolumesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EncryptVolumesRequest; + + /** + * Creates a plain object from an EncryptVolumesRequest message. Also converts values to other types if specified. + * @param message EncryptVolumesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.EncryptVolumesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptVolumesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptVolumesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyKmsConfigRequest. */ + interface IVerifyKmsConfigRequest { + + /** VerifyKmsConfigRequest name */ + name?: (string|null); + } + + /** Represents a VerifyKmsConfigRequest. */ + class VerifyKmsConfigRequest implements IVerifyKmsConfigRequest { + + /** + * Constructs a new VerifyKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IVerifyKmsConfigRequest); + + /** VerifyKmsConfigRequest name. */ + public name: string; + + /** + * Creates a new VerifyKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IVerifyKmsConfigRequest): google.cloud.netapp.v1.VerifyKmsConfigRequest; + + /** + * Encodes the specified VerifyKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @param message VerifyKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IVerifyKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @param message VerifyKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IVerifyKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.VerifyKmsConfigRequest; + + /** + * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.VerifyKmsConfigRequest; + + /** + * Verifies a VerifyKmsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerifyKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.VerifyKmsConfigRequest; + + /** + * Creates a plain object from a VerifyKmsConfigRequest message. Also converts values to other types if specified. + * @param message VerifyKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.VerifyKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyKmsConfigResponse. */ + interface IVerifyKmsConfigResponse { + + /** VerifyKmsConfigResponse healthy */ + healthy?: (boolean|null); + + /** VerifyKmsConfigResponse healthError */ + healthError?: (string|null); + + /** VerifyKmsConfigResponse instructions */ + instructions?: (string|null); + } + + /** Represents a VerifyKmsConfigResponse. */ + class VerifyKmsConfigResponse implements IVerifyKmsConfigResponse { + + /** + * Constructs a new VerifyKmsConfigResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IVerifyKmsConfigResponse); + + /** VerifyKmsConfigResponse healthy. */ + public healthy: boolean; + + /** VerifyKmsConfigResponse healthError. */ + public healthError: string; + + /** VerifyKmsConfigResponse instructions. */ + public instructions: string; + + /** + * Creates a new VerifyKmsConfigResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyKmsConfigResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IVerifyKmsConfigResponse): google.cloud.netapp.v1.VerifyKmsConfigResponse; + + /** + * Encodes the specified VerifyKmsConfigResponse message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @param message VerifyKmsConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IVerifyKmsConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyKmsConfigResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @param message VerifyKmsConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IVerifyKmsConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyKmsConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.VerifyKmsConfigResponse; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyKmsConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.VerifyKmsConfigResponse; + + /** + * Verifies a VerifyKmsConfigResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerifyKmsConfigResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyKmsConfigResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.VerifyKmsConfigResponse; + + /** + * Creates a plain object from a VerifyKmsConfigResponse message. Also converts values to other types if specified. + * @param message VerifyKmsConfigResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.VerifyKmsConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyKmsConfigResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyKmsConfigResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KmsConfig. */ + interface IKmsConfig { + + /** KmsConfig name */ + name?: (string|null); + + /** KmsConfig cryptoKeyName */ + cryptoKeyName?: (string|null); + + /** KmsConfig state */ + state?: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State|null); + + /** KmsConfig stateDetails */ + stateDetails?: (string|null); + + /** KmsConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** KmsConfig description */ + description?: (string|null); + + /** KmsConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** KmsConfig instructions */ + instructions?: (string|null); + + /** KmsConfig serviceAccount */ + serviceAccount?: (string|null); + } + + /** Represents a KmsConfig. */ + class KmsConfig implements IKmsConfig { + + /** + * Constructs a new KmsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IKmsConfig); + + /** KmsConfig name. */ + public name: string; + + /** KmsConfig cryptoKeyName. */ + public cryptoKeyName: string; + + /** KmsConfig state. */ + public state: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State); + + /** KmsConfig stateDetails. */ + public stateDetails: string; + + /** KmsConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** KmsConfig description. */ + public description: string; + + /** KmsConfig labels. */ + public labels: { [k: string]: string }; + + /** KmsConfig instructions. */ + public instructions: string; + + /** KmsConfig serviceAccount. */ + public serviceAccount: string; + + /** + * Creates a new KmsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns KmsConfig instance + */ + public static create(properties?: google.cloud.netapp.v1.IKmsConfig): google.cloud.netapp.v1.KmsConfig; + + /** + * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @param message KmsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @param message KmsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KmsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KmsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.KmsConfig; + + /** + * Decodes a KmsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KmsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.KmsConfig; + + /** + * Verifies a KmsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KmsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KmsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.KmsConfig; + + /** + * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. + * @param message KmsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.KmsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KmsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KmsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace KmsConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + IN_USE = 5, + ERROR = 6, + KEY_CHECK_PENDING = 7, + KEY_NOT_REACHABLE = 8, + DISABLING = 9, + DISABLED = 10, + MIGRATING = 11 + } + } + + /** Properties of a TransferStats. */ + interface ITransferStats { + + /** TransferStats transferBytes */ + transferBytes?: (number|Long|string|null); + + /** TransferStats totalTransferDuration */ + totalTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lastTransferBytes */ + lastTransferBytes?: (number|Long|string|null); + + /** TransferStats lastTransferDuration */ + lastTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lagDuration */ + lagDuration?: (google.protobuf.IDuration|null); + + /** TransferStats updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferEndTime */ + lastTransferEndTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferError */ + lastTransferError?: (string|null); + } + + /** Represents a TransferStats. */ + class TransferStats implements ITransferStats { + + /** + * Constructs a new TransferStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ITransferStats); + + /** TransferStats transferBytes. */ + public transferBytes?: (number|Long|string|null); + + /** TransferStats totalTransferDuration. */ + public totalTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lastTransferBytes. */ + public lastTransferBytes?: (number|Long|string|null); + + /** TransferStats lastTransferDuration. */ + public lastTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lagDuration. */ + public lagDuration?: (google.protobuf.IDuration|null); + + /** TransferStats updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferEndTime. */ + public lastTransferEndTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferError. */ + public lastTransferError?: (string|null); + + /** TransferStats _transferBytes. */ + public _transferBytes?: "transferBytes"; + + /** TransferStats _totalTransferDuration. */ + public _totalTransferDuration?: "totalTransferDuration"; + + /** TransferStats _lastTransferBytes. */ + public _lastTransferBytes?: "lastTransferBytes"; + + /** TransferStats _lastTransferDuration. */ + public _lastTransferDuration?: "lastTransferDuration"; + + /** TransferStats _lagDuration. */ + public _lagDuration?: "lagDuration"; + + /** TransferStats _updateTime. */ + public _updateTime?: "updateTime"; + + /** TransferStats _lastTransferEndTime. */ + public _lastTransferEndTime?: "lastTransferEndTime"; + + /** TransferStats _lastTransferError. */ + public _lastTransferError?: "lastTransferError"; + + /** + * Creates a new TransferStats instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferStats instance + */ + public static create(properties?: google.cloud.netapp.v1.ITransferStats): google.cloud.netapp.v1.TransferStats; + + /** + * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @param message TransferStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ITransferStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @param message TransferStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ITransferStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.TransferStats; + + /** + * Decodes a TransferStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.TransferStats; + + /** + * Verifies a TransferStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransferStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.TransferStats; + + /** + * Creates a plain object from a TransferStats message. Also converts values to other types if specified. + * @param message TransferStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.TransferStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransferStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Replication. */ + interface IReplication { + + /** Replication name */ + name?: (string|null); + + /** Replication state */ + state?: (google.cloud.netapp.v1.Replication.State|keyof typeof google.cloud.netapp.v1.Replication.State|null); + + /** Replication stateDetails */ + stateDetails?: (string|null); + + /** Replication role */ + role?: (google.cloud.netapp.v1.Replication.ReplicationRole|keyof typeof google.cloud.netapp.v1.Replication.ReplicationRole|null); + + /** Replication replicationSchedule */ + replicationSchedule?: (google.cloud.netapp.v1.Replication.ReplicationSchedule|keyof typeof google.cloud.netapp.v1.Replication.ReplicationSchedule|null); + + /** Replication mirrorState */ + mirrorState?: (google.cloud.netapp.v1.Replication.MirrorState|keyof typeof google.cloud.netapp.v1.Replication.MirrorState|null); + + /** Replication healthy */ + healthy?: (boolean|null); + + /** Replication createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Replication destinationVolume */ + destinationVolume?: (string|null); + + /** Replication transferStats */ + transferStats?: (google.cloud.netapp.v1.ITransferStats|null); + + /** Replication labels */ + labels?: ({ [k: string]: string }|null); + + /** Replication description */ + description?: (string|null); + + /** Replication destinationVolumeParameters */ + destinationVolumeParameters?: (google.cloud.netapp.v1.IDestinationVolumeParameters|null); + + /** Replication sourceVolume */ + sourceVolume?: (string|null); + } + + /** Represents a Replication. */ + class Replication implements IReplication { + + /** + * Constructs a new Replication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IReplication); + + /** Replication name. */ + public name: string; + + /** Replication state. */ + public state: (google.cloud.netapp.v1.Replication.State|keyof typeof google.cloud.netapp.v1.Replication.State); + + /** Replication stateDetails. */ + public stateDetails: string; + + /** Replication role. */ + public role: (google.cloud.netapp.v1.Replication.ReplicationRole|keyof typeof google.cloud.netapp.v1.Replication.ReplicationRole); + + /** Replication replicationSchedule. */ + public replicationSchedule: (google.cloud.netapp.v1.Replication.ReplicationSchedule|keyof typeof google.cloud.netapp.v1.Replication.ReplicationSchedule); + + /** Replication mirrorState. */ + public mirrorState: (google.cloud.netapp.v1.Replication.MirrorState|keyof typeof google.cloud.netapp.v1.Replication.MirrorState); + + /** Replication healthy. */ + public healthy?: (boolean|null); + + /** Replication createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Replication destinationVolume. */ + public destinationVolume: string; + + /** Replication transferStats. */ + public transferStats?: (google.cloud.netapp.v1.ITransferStats|null); + + /** Replication labels. */ + public labels: { [k: string]: string }; + + /** Replication description. */ + public description?: (string|null); + + /** Replication destinationVolumeParameters. */ + public destinationVolumeParameters?: (google.cloud.netapp.v1.IDestinationVolumeParameters|null); + + /** Replication sourceVolume. */ + public sourceVolume: string; + + /** Replication _healthy. */ + public _healthy?: "healthy"; + + /** Replication _description. */ + public _description?: "description"; + + /** + * Creates a new Replication instance using the specified properties. + * @param [properties] Properties to set + * @returns Replication instance + */ + public static create(properties?: google.cloud.netapp.v1.IReplication): google.cloud.netapp.v1.Replication; + + /** + * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @param message Replication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IReplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @param message Replication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IReplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Replication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Replication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.Replication; + + /** + * Decodes a Replication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Replication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.Replication; + + /** + * Verifies a Replication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Replication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Replication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Replication; + + /** + * Creates a plain object from a Replication message. Also converts values to other types if specified. + * @param message Replication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Replication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Replication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Replication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Replication { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 5, + ERROR = 6 + } + + /** ReplicationRole enum. */ + enum ReplicationRole { + REPLICATION_ROLE_UNSPECIFIED = 0, + SOURCE = 1, + DESTINATION = 2 + } + + /** ReplicationSchedule enum. */ + enum ReplicationSchedule { + REPLICATION_SCHEDULE_UNSPECIFIED = 0, + EVERY_10_MINUTES = 1, + HOURLY = 2, + DAILY = 3 + } + + /** MirrorState enum. */ + enum MirrorState { + MIRROR_STATE_UNSPECIFIED = 0, + PREPARING = 1, + MIRRORED = 2, + STOPPED = 3, + TRANSFERRING = 4 + } + } + + /** Properties of a ListReplicationsRequest. */ + interface IListReplicationsRequest { + + /** ListReplicationsRequest parent */ + parent?: (string|null); + + /** ListReplicationsRequest pageSize */ + pageSize?: (number|null); + + /** ListReplicationsRequest pageToken */ + pageToken?: (string|null); + + /** ListReplicationsRequest orderBy */ + orderBy?: (string|null); + + /** ListReplicationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListReplicationsRequest. */ + class ListReplicationsRequest implements IListReplicationsRequest { + + /** + * Constructs a new ListReplicationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListReplicationsRequest); + + /** ListReplicationsRequest parent. */ + public parent: string; + + /** ListReplicationsRequest pageSize. */ + public pageSize: number; + + /** ListReplicationsRequest pageToken. */ + public pageToken: string; + + /** ListReplicationsRequest orderBy. */ + public orderBy: string; + + /** ListReplicationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListReplicationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReplicationsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListReplicationsRequest): google.cloud.netapp.v1.ListReplicationsRequest; + + /** + * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @param message ListReplicationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListReplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @param message ListReplicationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListReplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReplicationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListReplicationsRequest; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReplicationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListReplicationsRequest; + + /** + * Verifies a ListReplicationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReplicationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListReplicationsRequest; + + /** + * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. + * @param message ListReplicationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListReplicationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReplicationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReplicationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReplicationsResponse. */ + interface IListReplicationsResponse { + + /** ListReplicationsResponse replications */ + replications?: (google.cloud.netapp.v1.IReplication[]|null); + + /** ListReplicationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListReplicationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListReplicationsResponse. */ + class ListReplicationsResponse implements IListReplicationsResponse { + + /** + * Constructs a new ListReplicationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListReplicationsResponse); + + /** ListReplicationsResponse replications. */ + public replications: google.cloud.netapp.v1.IReplication[]; + + /** ListReplicationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListReplicationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListReplicationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReplicationsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListReplicationsResponse): google.cloud.netapp.v1.ListReplicationsResponse; + + /** + * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @param message ListReplicationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListReplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @param message ListReplicationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListReplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReplicationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListReplicationsResponse; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReplicationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListReplicationsResponse; + + /** + * Verifies a ListReplicationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReplicationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListReplicationsResponse; + + /** + * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. + * @param message ListReplicationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListReplicationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReplicationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReplicationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReplicationRequest. */ + interface IGetReplicationRequest { + + /** GetReplicationRequest name */ + name?: (string|null); + } + + /** Represents a GetReplicationRequest. */ + class GetReplicationRequest implements IGetReplicationRequest { + + /** + * Constructs a new GetReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetReplicationRequest); + + /** GetReplicationRequest name. */ + public name: string; + + /** + * Creates a new GetReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetReplicationRequest): google.cloud.netapp.v1.GetReplicationRequest; + + /** + * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @param message GetReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @param message GetReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.GetReplicationRequest; + + /** + * Decodes a GetReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.GetReplicationRequest; + + /** + * Verifies a GetReplicationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetReplicationRequest; + + /** + * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. + * @param message GetReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DestinationVolumeParameters. */ + interface IDestinationVolumeParameters { + + /** DestinationVolumeParameters storagePool */ + storagePool?: (string|null); + + /** DestinationVolumeParameters volumeId */ + volumeId?: (string|null); + + /** DestinationVolumeParameters shareName */ + shareName?: (string|null); + + /** DestinationVolumeParameters description */ + description?: (string|null); + } + + /** Represents a DestinationVolumeParameters. */ + class DestinationVolumeParameters implements IDestinationVolumeParameters { + + /** + * Constructs a new DestinationVolumeParameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDestinationVolumeParameters); + + /** DestinationVolumeParameters storagePool. */ + public storagePool: string; + + /** DestinationVolumeParameters volumeId. */ + public volumeId: string; + + /** DestinationVolumeParameters shareName. */ + public shareName: string; + + /** DestinationVolumeParameters description. */ + public description?: (string|null); + + /** DestinationVolumeParameters _description. */ + public _description?: "description"; + + /** + * Creates a new DestinationVolumeParameters instance using the specified properties. + * @param [properties] Properties to set + * @returns DestinationVolumeParameters instance + */ + public static create(properties?: google.cloud.netapp.v1.IDestinationVolumeParameters): google.cloud.netapp.v1.DestinationVolumeParameters; + + /** + * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @param message DestinationVolumeParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDestinationVolumeParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @param message DestinationVolumeParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDestinationVolumeParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DestinationVolumeParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DestinationVolumeParameters; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DestinationVolumeParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DestinationVolumeParameters; + + /** + * Verifies a DestinationVolumeParameters message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DestinationVolumeParameters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DestinationVolumeParameters; + + /** + * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. + * @param message DestinationVolumeParameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DestinationVolumeParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DestinationVolumeParameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DestinationVolumeParameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateReplicationRequest. */ + interface ICreateReplicationRequest { + + /** CreateReplicationRequest parent */ + parent?: (string|null); + + /** CreateReplicationRequest replication */ + replication?: (google.cloud.netapp.v1.IReplication|null); + + /** CreateReplicationRequest replicationId */ + replicationId?: (string|null); + } + + /** Represents a CreateReplicationRequest. */ + class CreateReplicationRequest implements ICreateReplicationRequest { + + /** + * Constructs a new CreateReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateReplicationRequest); + + /** CreateReplicationRequest parent. */ + public parent: string; + + /** CreateReplicationRequest replication. */ + public replication?: (google.cloud.netapp.v1.IReplication|null); + + /** CreateReplicationRequest replicationId. */ + public replicationId: string; + + /** + * Creates a new CreateReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateReplicationRequest): google.cloud.netapp.v1.CreateReplicationRequest; + + /** + * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @param message CreateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @param message CreateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.CreateReplicationRequest; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.CreateReplicationRequest; + + /** + * Verifies a CreateReplicationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateReplicationRequest; + + /** + * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. + * @param message CreateReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteReplicationRequest. */ + interface IDeleteReplicationRequest { + + /** DeleteReplicationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteReplicationRequest. */ + class DeleteReplicationRequest implements IDeleteReplicationRequest { + + /** + * Constructs a new DeleteReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteReplicationRequest); + + /** DeleteReplicationRequest name. */ + public name: string; + + /** + * Creates a new DeleteReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteReplicationRequest): google.cloud.netapp.v1.DeleteReplicationRequest; + + /** + * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @param message DeleteReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @param message DeleteReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DeleteReplicationRequest; + + /** + * Decodes a DeleteReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DeleteReplicationRequest; + + /** + * Verifies a DeleteReplicationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteReplicationRequest; + + /** + * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. + * @param message DeleteReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateReplicationRequest. */ + interface IUpdateReplicationRequest { + + /** UpdateReplicationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReplicationRequest replication */ + replication?: (google.cloud.netapp.v1.IReplication|null); + } + + /** Represents an UpdateReplicationRequest. */ + class UpdateReplicationRequest implements IUpdateReplicationRequest { + + /** + * Constructs a new UpdateReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateReplicationRequest); + + /** UpdateReplicationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReplicationRequest replication. */ + public replication?: (google.cloud.netapp.v1.IReplication|null); + + /** + * Creates a new UpdateReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateReplicationRequest): google.cloud.netapp.v1.UpdateReplicationRequest; + + /** + * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @param message UpdateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @param message UpdateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.UpdateReplicationRequest; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.UpdateReplicationRequest; + + /** + * Verifies an UpdateReplicationRequest message. + * @param message Plain 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 UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateReplicationRequest; + + /** + * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. + * @param message UpdateReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopReplicationRequest. */ + interface IStopReplicationRequest { + + /** StopReplicationRequest name */ + name?: (string|null); + + /** StopReplicationRequest force */ + force?: (boolean|null); + } + + /** Represents a StopReplicationRequest. */ + class StopReplicationRequest implements IStopReplicationRequest { + + /** + * Constructs a new StopReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IStopReplicationRequest); + + /** StopReplicationRequest name. */ + public name: string; + + /** StopReplicationRequest force. */ + public force: boolean; + + /** + * Creates a new StopReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StopReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IStopReplicationRequest): google.cloud.netapp.v1.StopReplicationRequest; + + /** + * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @param message StopReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @param message StopReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.StopReplicationRequest; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.StopReplicationRequest; + + /** + * Verifies a StopReplicationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.StopReplicationRequest; + + /** + * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. + * @param message StopReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.StopReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResumeReplicationRequest. */ + interface IResumeReplicationRequest { + + /** ResumeReplicationRequest name */ + name?: (string|null); + } + + /** Represents a ResumeReplicationRequest. */ + class ResumeReplicationRequest implements IResumeReplicationRequest { + + /** + * Constructs a new ResumeReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IResumeReplicationRequest); + + /** ResumeReplicationRequest name. */ + public name: string; + + /** + * Creates a new ResumeReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResumeReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IResumeReplicationRequest): google.cloud.netapp.v1.ResumeReplicationRequest; + + /** + * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @param message ResumeReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IResumeReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @param message ResumeReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IResumeReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResumeReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResumeReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ResumeReplicationRequest; + + /** + * Decodes a ResumeReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResumeReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ResumeReplicationRequest; + + /** + * Verifies a ResumeReplicationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResumeReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ResumeReplicationRequest; + + /** + * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. + * @param message ResumeReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ResumeReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResumeReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResumeReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReverseReplicationDirectionRequest. */ + interface IReverseReplicationDirectionRequest { + + /** ReverseReplicationDirectionRequest name */ + name?: (string|null); + } + + /** Represents a ReverseReplicationDirectionRequest. */ + class ReverseReplicationDirectionRequest implements IReverseReplicationDirectionRequest { + + /** + * Constructs a new ReverseReplicationDirectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IReverseReplicationDirectionRequest); + + /** ReverseReplicationDirectionRequest name. */ + public name: string; + + /** + * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReverseReplicationDirectionRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IReverseReplicationDirectionRequest): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @param message ReverseReplicationDirectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @param message ReverseReplicationDirectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReverseReplicationDirectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReverseReplicationDirectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Verifies a ReverseReplicationDirectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReverseReplicationDirectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. + * @param message ReverseReplicationDirectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ReverseReplicationDirectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReverseReplicationDirectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReverseReplicationDirectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSnapshotsRequest. */ + interface IListSnapshotsRequest { + + /** ListSnapshotsRequest parent */ + parent?: (string|null); + + /** ListSnapshotsRequest pageSize */ + pageSize?: (number|null); + + /** ListSnapshotsRequest pageToken */ + pageToken?: (string|null); + + /** ListSnapshotsRequest orderBy */ + orderBy?: (string|null); + + /** ListSnapshotsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListSnapshotsRequest. */ + class ListSnapshotsRequest implements IListSnapshotsRequest { + + /** + * Constructs a new ListSnapshotsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListSnapshotsRequest); + + /** ListSnapshotsRequest parent. */ + public parent: string; + + /** ListSnapshotsRequest pageSize. */ + public pageSize: number; + + /** ListSnapshotsRequest pageToken. */ + public pageToken: string; + + /** ListSnapshotsRequest orderBy. */ + public orderBy: string; + + /** ListSnapshotsRequest filter. */ + public filter: string; + + /** + * Creates a new ListSnapshotsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSnapshotsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListSnapshotsRequest): google.cloud.netapp.v1.ListSnapshotsRequest; + + /** + * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @param message ListSnapshotsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @param message ListSnapshotsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListSnapshotsRequest; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListSnapshotsRequest; + + /** + * Verifies a ListSnapshotsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSnapshotsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListSnapshotsRequest; + + /** + * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. + * @param message ListSnapshotsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListSnapshotsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSnapshotsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSnapshotsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSnapshotsResponse. */ + interface IListSnapshotsResponse { + + /** ListSnapshotsResponse snapshots */ + snapshots?: (google.cloud.netapp.v1.ISnapshot[]|null); + + /** ListSnapshotsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListSnapshotsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListSnapshotsResponse. */ + class ListSnapshotsResponse implements IListSnapshotsResponse { + + /** + * Constructs a new ListSnapshotsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListSnapshotsResponse); + + /** ListSnapshotsResponse snapshots. */ + public snapshots: google.cloud.netapp.v1.ISnapshot[]; + + /** ListSnapshotsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListSnapshotsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListSnapshotsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSnapshotsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListSnapshotsResponse): google.cloud.netapp.v1.ListSnapshotsResponse; + + /** + * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @param message ListSnapshotsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @param message ListSnapshotsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListSnapshotsResponse; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListSnapshotsResponse; + + /** + * Verifies a ListSnapshotsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSnapshotsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListSnapshotsResponse; + + /** + * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. + * @param message ListSnapshotsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListSnapshotsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSnapshotsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSnapshotsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSnapshotRequest. */ + interface IGetSnapshotRequest { + + /** GetSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a GetSnapshotRequest. */ + class GetSnapshotRequest implements IGetSnapshotRequest { + + /** + * Constructs a new GetSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetSnapshotRequest); + + /** GetSnapshotRequest name. */ + public name: string; + + /** + * Creates a new GetSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetSnapshotRequest): google.cloud.netapp.v1.GetSnapshotRequest; + + /** + * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @param message GetSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @param message GetSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.GetSnapshotRequest; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.GetSnapshotRequest; + + /** + * Verifies a GetSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetSnapshotRequest; + + /** + * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. + * @param message GetSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSnapshotRequest. */ + interface ICreateSnapshotRequest { + + /** CreateSnapshotRequest parent */ + parent?: (string|null); + + /** CreateSnapshotRequest snapshot */ + snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + + /** CreateSnapshotRequest snapshotId */ + snapshotId?: (string|null); + } + + /** Represents a CreateSnapshotRequest. */ + class CreateSnapshotRequest implements ICreateSnapshotRequest { + + /** + * Constructs a new CreateSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateSnapshotRequest); + + /** CreateSnapshotRequest parent. */ + public parent: string; + + /** CreateSnapshotRequest snapshot. */ + public snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + + /** CreateSnapshotRequest snapshotId. */ + public snapshotId: string; + + /** + * Creates a new CreateSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateSnapshotRequest): google.cloud.netapp.v1.CreateSnapshotRequest; + + /** + * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @param message CreateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @param message CreateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.CreateSnapshotRequest; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.CreateSnapshotRequest; + + /** + * Verifies a CreateSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateSnapshotRequest; + + /** + * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. + * @param message CreateSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSnapshotRequest. */ + interface IDeleteSnapshotRequest { + + /** DeleteSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSnapshotRequest. */ + class DeleteSnapshotRequest implements IDeleteSnapshotRequest { + + /** + * Constructs a new DeleteSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteSnapshotRequest); + + /** DeleteSnapshotRequest name. */ + public name: string; + + /** + * Creates a new DeleteSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteSnapshotRequest): google.cloud.netapp.v1.DeleteSnapshotRequest; + + /** + * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @param message DeleteSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @param message DeleteSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DeleteSnapshotRequest; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DeleteSnapshotRequest; + + /** + * Verifies a DeleteSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteSnapshotRequest; + + /** + * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. + * @param message DeleteSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSnapshotRequest. */ + interface IUpdateSnapshotRequest { + + /** UpdateSnapshotRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSnapshotRequest snapshot */ + snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + } + + /** Represents an UpdateSnapshotRequest. */ + class UpdateSnapshotRequest implements IUpdateSnapshotRequest { + + /** + * Constructs a new UpdateSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateSnapshotRequest); + + /** UpdateSnapshotRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSnapshotRequest snapshot. */ + public snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + + /** + * Creates a new UpdateSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateSnapshotRequest): google.cloud.netapp.v1.UpdateSnapshotRequest; + + /** + * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @param message UpdateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @param message UpdateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.UpdateSnapshotRequest; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.UpdateSnapshotRequest; + + /** + * Verifies an UpdateSnapshotRequest message. + * @param message Plain 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 UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateSnapshotRequest; + + /** + * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. + * @param message UpdateSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Snapshot. */ + interface ISnapshot { + + /** Snapshot name */ + name?: (string|null); + + /** Snapshot state */ + state?: (google.cloud.netapp.v1.Snapshot.State|keyof typeof google.cloud.netapp.v1.Snapshot.State|null); + + /** Snapshot stateDetails */ + stateDetails?: (string|null); + + /** Snapshot description */ + description?: (string|null); + + /** Snapshot usedBytes */ + usedBytes?: (number|null); + + /** Snapshot createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Snapshot. */ + class Snapshot implements ISnapshot { + + /** + * Constructs a new Snapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISnapshot); + + /** Snapshot name. */ + public name: string; + + /** Snapshot state. */ + public state: (google.cloud.netapp.v1.Snapshot.State|keyof typeof google.cloud.netapp.v1.Snapshot.State); + + /** Snapshot stateDetails. */ + public stateDetails: string; + + /** Snapshot description. */ + public description: string; + + /** Snapshot usedBytes. */ + public usedBytes: number; + + /** Snapshot createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Snapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns Snapshot instance + */ + public static create(properties?: google.cloud.netapp.v1.ISnapshot): google.cloud.netapp.v1.Snapshot; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.Snapshot; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.Snapshot; + + /** + * Verifies a Snapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Snapshot + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Snapshot; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @param message Snapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Snapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Snapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Snapshot { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + DISABLED = 5, + ERROR = 6 + } + } + + /** Properties of a GetStoragePoolRequest. */ + interface IGetStoragePoolRequest { + + /** GetStoragePoolRequest name */ + name?: (string|null); + } + + /** Represents a GetStoragePoolRequest. */ + class GetStoragePoolRequest implements IGetStoragePoolRequest { + + /** + * Constructs a new GetStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetStoragePoolRequest); + + /** GetStoragePoolRequest name. */ + public name: string; + + /** + * Creates a new GetStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetStoragePoolRequest): google.cloud.netapp.v1.GetStoragePoolRequest; + + /** + * Encodes the specified GetStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @param message GetStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @param message GetStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.GetStoragePoolRequest; + + /** + * Decodes a GetStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.GetStoragePoolRequest; + + /** + * Verifies a GetStoragePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetStoragePoolRequest; + + /** + * Creates a plain object from a GetStoragePoolRequest message. Also converts values to other types if specified. + * @param message GetStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListStoragePoolsRequest. */ + interface IListStoragePoolsRequest { + + /** ListStoragePoolsRequest parent */ + parent?: (string|null); + + /** ListStoragePoolsRequest pageSize */ + pageSize?: (number|null); + + /** ListStoragePoolsRequest pageToken */ + pageToken?: (string|null); + + /** ListStoragePoolsRequest orderBy */ + orderBy?: (string|null); + + /** ListStoragePoolsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListStoragePoolsRequest. */ + class ListStoragePoolsRequest implements IListStoragePoolsRequest { + + /** + * Constructs a new ListStoragePoolsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListStoragePoolsRequest); + + /** ListStoragePoolsRequest parent. */ + public parent: string; + + /** ListStoragePoolsRequest pageSize. */ + public pageSize: number; + + /** ListStoragePoolsRequest pageToken. */ + public pageToken: string; + + /** ListStoragePoolsRequest orderBy. */ + public orderBy: string; + + /** ListStoragePoolsRequest filter. */ + public filter: string; + + /** + * Creates a new ListStoragePoolsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoragePoolsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListStoragePoolsRequest): google.cloud.netapp.v1.ListStoragePoolsRequest; + + /** + * Encodes the specified ListStoragePoolsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @param message ListStoragePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListStoragePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoragePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @param message ListStoragePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListStoragePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoragePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListStoragePoolsRequest; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoragePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListStoragePoolsRequest; + + /** + * Verifies a ListStoragePoolsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListStoragePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoragePoolsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListStoragePoolsRequest; + + /** + * Creates a plain object from a ListStoragePoolsRequest message. Also converts values to other types if specified. + * @param message ListStoragePoolsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListStoragePoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoragePoolsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListStoragePoolsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListStoragePoolsResponse. */ + interface IListStoragePoolsResponse { + + /** ListStoragePoolsResponse storagePools */ + storagePools?: (google.cloud.netapp.v1.IStoragePool[]|null); + + /** ListStoragePoolsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListStoragePoolsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListStoragePoolsResponse. */ + class ListStoragePoolsResponse implements IListStoragePoolsResponse { + + /** + * Constructs a new ListStoragePoolsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListStoragePoolsResponse); + + /** ListStoragePoolsResponse storagePools. */ + public storagePools: google.cloud.netapp.v1.IStoragePool[]; + + /** ListStoragePoolsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListStoragePoolsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListStoragePoolsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoragePoolsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListStoragePoolsResponse): google.cloud.netapp.v1.ListStoragePoolsResponse; + + /** + * Encodes the specified ListStoragePoolsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @param message ListStoragePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListStoragePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoragePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @param message ListStoragePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListStoragePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoragePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListStoragePoolsResponse; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoragePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListStoragePoolsResponse; + + /** + * Verifies a ListStoragePoolsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListStoragePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoragePoolsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListStoragePoolsResponse; + + /** + * Creates a plain object from a ListStoragePoolsResponse message. Also converts values to other types if specified. + * @param message ListStoragePoolsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListStoragePoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoragePoolsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListStoragePoolsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateStoragePoolRequest. */ + interface ICreateStoragePoolRequest { + + /** CreateStoragePoolRequest parent */ + parent?: (string|null); + + /** CreateStoragePoolRequest storagePoolId */ + storagePoolId?: (string|null); + + /** CreateStoragePoolRequest storagePool */ + storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + } + + /** Represents a CreateStoragePoolRequest. */ + class CreateStoragePoolRequest implements ICreateStoragePoolRequest { + + /** + * Constructs a new CreateStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateStoragePoolRequest); + + /** CreateStoragePoolRequest parent. */ + public parent: string; + + /** CreateStoragePoolRequest storagePoolId. */ + public storagePoolId: string; + + /** CreateStoragePoolRequest storagePool. */ + public storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + + /** + * Creates a new CreateStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateStoragePoolRequest): google.cloud.netapp.v1.CreateStoragePoolRequest; + + /** + * Encodes the specified CreateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @param message CreateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @param message CreateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.CreateStoragePoolRequest; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.CreateStoragePoolRequest; + + /** + * Verifies a CreateStoragePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateStoragePoolRequest; + + /** + * Creates a plain object from a CreateStoragePoolRequest message. Also converts values to other types if specified. + * @param message CreateStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateStoragePoolRequest. */ + interface IUpdateStoragePoolRequest { + + /** UpdateStoragePoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateStoragePoolRequest storagePool */ + storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + } + + /** Represents an UpdateStoragePoolRequest. */ + class UpdateStoragePoolRequest implements IUpdateStoragePoolRequest { + + /** + * Constructs a new UpdateStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateStoragePoolRequest); + + /** UpdateStoragePoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateStoragePoolRequest storagePool. */ + public storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + + /** + * Creates a new UpdateStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateStoragePoolRequest): google.cloud.netapp.v1.UpdateStoragePoolRequest; + + /** + * Encodes the specified UpdateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @param message UpdateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @param message UpdateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.UpdateStoragePoolRequest; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.UpdateStoragePoolRequest; + + /** + * Verifies an UpdateStoragePoolRequest message. + * @param message Plain 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 UpdateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateStoragePoolRequest; + + /** + * Creates a plain object from an UpdateStoragePoolRequest message. Also converts values to other types if specified. + * @param message UpdateStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteStoragePoolRequest. */ + interface IDeleteStoragePoolRequest { + + /** DeleteStoragePoolRequest name */ + name?: (string|null); + } + + /** Represents a DeleteStoragePoolRequest. */ + class DeleteStoragePoolRequest implements IDeleteStoragePoolRequest { + + /** + * Constructs a new DeleteStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteStoragePoolRequest); + + /** DeleteStoragePoolRequest name. */ + public name: string; + + /** + * Creates a new DeleteStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteStoragePoolRequest): google.cloud.netapp.v1.DeleteStoragePoolRequest; + + /** + * Encodes the specified DeleteStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @param message DeleteStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @param message DeleteStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DeleteStoragePoolRequest; + + /** + * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DeleteStoragePoolRequest; + + /** + * Verifies a DeleteStoragePoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteStoragePoolRequest; + + /** + * Creates a plain object from a DeleteStoragePoolRequest message. Also converts values to other types if specified. + * @param message DeleteStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StoragePool. */ + interface IStoragePool { + + /** StoragePool name */ + name?: (string|null); + + /** StoragePool serviceLevel */ + serviceLevel?: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel|null); + + /** StoragePool capacityGib */ + capacityGib?: (number|Long|string|null); + + /** StoragePool volumeCapacityGib */ + volumeCapacityGib?: (number|Long|string|null); + + /** StoragePool volumeCount */ + volumeCount?: (number|null); + + /** StoragePool state */ + state?: (google.cloud.netapp.v1.StoragePool.State|keyof typeof google.cloud.netapp.v1.StoragePool.State|null); + + /** StoragePool stateDetails */ + stateDetails?: (string|null); + + /** StoragePool createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** StoragePool description */ + description?: (string|null); + + /** StoragePool labels */ + labels?: ({ [k: string]: string }|null); + + /** StoragePool network */ + network?: (string|null); + + /** StoragePool activeDirectory */ + activeDirectory?: (string|null); + + /** StoragePool kmsConfig */ + kmsConfig?: (string|null); + + /** StoragePool ldapEnabled */ + ldapEnabled?: (boolean|null); + + /** StoragePool psaRange */ + psaRange?: (string|null); + + /** StoragePool encryptionType */ + encryptionType?: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType|null); + + /** StoragePool globalAccessAllowed */ + globalAccessAllowed?: (boolean|null); + } + + /** Represents a StoragePool. */ + class StoragePool implements IStoragePool { + + /** + * Constructs a new StoragePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IStoragePool); + + /** StoragePool name. */ + public name: string; + + /** StoragePool serviceLevel. */ + public serviceLevel: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel); + + /** StoragePool capacityGib. */ + public capacityGib: (number|Long|string); + + /** StoragePool volumeCapacityGib. */ + public volumeCapacityGib: (number|Long|string); + + /** StoragePool volumeCount. */ + public volumeCount: number; + + /** StoragePool state. */ + public state: (google.cloud.netapp.v1.StoragePool.State|keyof typeof google.cloud.netapp.v1.StoragePool.State); + + /** StoragePool stateDetails. */ + public stateDetails: string; + + /** StoragePool createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** StoragePool description. */ + public description: string; + + /** StoragePool labels. */ + public labels: { [k: string]: string }; + + /** StoragePool network. */ + public network: string; + + /** StoragePool activeDirectory. */ + public activeDirectory: string; + + /** StoragePool kmsConfig. */ + public kmsConfig: string; + + /** StoragePool ldapEnabled. */ + public ldapEnabled: boolean; + + /** StoragePool psaRange. */ + public psaRange: string; + + /** StoragePool encryptionType. */ + public encryptionType: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType); + + /** StoragePool globalAccessAllowed. */ + public globalAccessAllowed?: (boolean|null); + + /** StoragePool _globalAccessAllowed. */ + public _globalAccessAllowed?: "globalAccessAllowed"; + + /** + * Creates a new StoragePool instance using the specified properties. + * @param [properties] Properties to set + * @returns StoragePool instance + */ + public static create(properties?: google.cloud.netapp.v1.IStoragePool): google.cloud.netapp.v1.StoragePool; + + /** + * Encodes the specified StoragePool message. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @param message StoragePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IStoragePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoragePool message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @param message StoragePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IStoragePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoragePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoragePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.StoragePool; + + /** + * Decodes a StoragePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoragePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.StoragePool; + + /** + * Verifies a StoragePool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoragePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoragePool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.StoragePool; + + /** + * Creates a plain object from a StoragePool message. Also converts values to other types if specified. + * @param message StoragePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.StoragePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoragePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoragePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StoragePool { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + RESTORING = 5, + DISABLED = 6, + ERROR = 7 + } + } + + /** ServiceLevel enum. */ + enum ServiceLevel { + SERVICE_LEVEL_UNSPECIFIED = 0, + PREMIUM = 1, + EXTREME = 2, + STANDARD = 3 + } + + /** EncryptionType enum. */ + enum EncryptionType { + ENCRYPTION_TYPE_UNSPECIFIED = 0, + SERVICE_MANAGED = 1, + CLOUD_KMS = 2 + } + + /** Protocols enum. */ + enum Protocols { + PROTOCOLS_UNSPECIFIED = 0, + NFSV3 = 1, + NFSV4 = 2, + SMB = 3 + } + + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + READ_ONLY = 1, + READ_WRITE = 2, + READ_NONE = 3 + } + + /** SMBSettings enum. */ + enum SMBSettings { + SMB_SETTINGS_UNSPECIFIED = 0, + ENCRYPT_DATA = 1, + BROWSABLE = 2, + CHANGE_NOTIFY = 3, + NON_BROWSABLE = 4, + OPLOCKS = 5, + SHOW_SNAPSHOT = 6, + SHOW_PREVIOUS_VERSIONS = 7, + ACCESS_BASED_ENUMERATION = 8, + CONTINUOUSLY_AVAILABLE = 9 + } + + /** SecurityStyle enum. */ + enum SecurityStyle { + SECURITY_STYLE_UNSPECIFIED = 0, + NTFS = 1, + UNIX = 2 + } + + /** RestrictedAction enum. */ + enum RestrictedAction { + RESTRICTED_ACTION_UNSPECIFIED = 0, + DELETE = 1 + } + + /** Properties of a ListVolumesRequest. */ + interface IListVolumesRequest { + + /** ListVolumesRequest parent */ + parent?: (string|null); + + /** ListVolumesRequest pageSize */ + pageSize?: (number|null); + + /** ListVolumesRequest pageToken */ + pageToken?: (string|null); + + /** ListVolumesRequest filter */ + filter?: (string|null); + + /** ListVolumesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListVolumesRequest. */ + class ListVolumesRequest implements IListVolumesRequest { + + /** + * Constructs a new ListVolumesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListVolumesRequest); + + /** ListVolumesRequest parent. */ + public parent: string; + + /** ListVolumesRequest pageSize. */ + public pageSize: number; + + /** ListVolumesRequest pageToken. */ + public pageToken: string; + + /** ListVolumesRequest filter. */ + public filter: string; + + /** ListVolumesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListVolumesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVolumesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListVolumesRequest): google.cloud.netapp.v1.ListVolumesRequest; + + /** + * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @param message ListVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @param message ListVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListVolumesRequest; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListVolumesRequest; + + /** + * Verifies a ListVolumesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVolumesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListVolumesRequest; + + /** + * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. + * @param message ListVolumesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListVolumesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVolumesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVolumesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVolumesResponse. */ + interface IListVolumesResponse { + + /** ListVolumesResponse volumes */ + volumes?: (google.cloud.netapp.v1.IVolume[]|null); + + /** ListVolumesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListVolumesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListVolumesResponse. */ + class ListVolumesResponse implements IListVolumesResponse { + + /** + * Constructs a new ListVolumesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListVolumesResponse); + + /** ListVolumesResponse volumes. */ + public volumes: google.cloud.netapp.v1.IVolume[]; + + /** ListVolumesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListVolumesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListVolumesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVolumesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListVolumesResponse): google.cloud.netapp.v1.ListVolumesResponse; + + /** + * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @param message ListVolumesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListVolumesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @param message ListVolumesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListVolumesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ListVolumesResponse; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ListVolumesResponse; + + /** + * Verifies a ListVolumesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVolumesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVolumesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListVolumesResponse; + + /** + * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. + * @param message ListVolumesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListVolumesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVolumesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVolumesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVolumeRequest. */ + interface IGetVolumeRequest { + + /** GetVolumeRequest name */ + name?: (string|null); + } + + /** Represents a GetVolumeRequest. */ + class GetVolumeRequest implements IGetVolumeRequest { + + /** + * Constructs a new GetVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetVolumeRequest); + + /** GetVolumeRequest name. */ + public name: string; + + /** + * Creates a new GetVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetVolumeRequest): google.cloud.netapp.v1.GetVolumeRequest; + + /** + * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @param message GetVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @param message GetVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.GetVolumeRequest; + + /** + * Decodes a GetVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.GetVolumeRequest; + + /** + * Verifies a GetVolumeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetVolumeRequest; + + /** + * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. + * @param message GetVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVolumeRequest. */ + interface ICreateVolumeRequest { + + /** CreateVolumeRequest parent */ + parent?: (string|null); + + /** CreateVolumeRequest volumeId */ + volumeId?: (string|null); + + /** CreateVolumeRequest volume */ + volume?: (google.cloud.netapp.v1.IVolume|null); + } + + /** Represents a CreateVolumeRequest. */ + class CreateVolumeRequest implements ICreateVolumeRequest { + + /** + * Constructs a new CreateVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateVolumeRequest); + + /** CreateVolumeRequest parent. */ + public parent: string; + + /** CreateVolumeRequest volumeId. */ + public volumeId: string; + + /** CreateVolumeRequest volume. */ + public volume?: (google.cloud.netapp.v1.IVolume|null); + + /** + * Creates a new CreateVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateVolumeRequest): google.cloud.netapp.v1.CreateVolumeRequest; + + /** + * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @param message CreateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @param message CreateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.CreateVolumeRequest; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.CreateVolumeRequest; + + /** + * Verifies a CreateVolumeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateVolumeRequest; + + /** + * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. + * @param message CreateVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateVolumeRequest. */ + interface IUpdateVolumeRequest { + + /** UpdateVolumeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVolumeRequest volume */ + volume?: (google.cloud.netapp.v1.IVolume|null); + } + + /** Represents an UpdateVolumeRequest. */ + class UpdateVolumeRequest implements IUpdateVolumeRequest { + + /** + * Constructs a new UpdateVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateVolumeRequest); + + /** UpdateVolumeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVolumeRequest volume. */ + public volume?: (google.cloud.netapp.v1.IVolume|null); + + /** + * Creates a new UpdateVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateVolumeRequest): google.cloud.netapp.v1.UpdateVolumeRequest; + + /** + * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @param message UpdateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @param message UpdateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.UpdateVolumeRequest; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.UpdateVolumeRequest; + + /** + * Verifies an UpdateVolumeRequest message. + * @param message Plain 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 UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateVolumeRequest; + + /** + * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. + * @param message UpdateVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteVolumeRequest. */ + interface IDeleteVolumeRequest { + + /** DeleteVolumeRequest name */ + name?: (string|null); + + /** DeleteVolumeRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteVolumeRequest. */ + class DeleteVolumeRequest implements IDeleteVolumeRequest { + + /** + * Constructs a new DeleteVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteVolumeRequest); + + /** DeleteVolumeRequest name. */ + public name: string; + + /** DeleteVolumeRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteVolumeRequest): google.cloud.netapp.v1.DeleteVolumeRequest; + + /** + * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @param message DeleteVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @param message DeleteVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DeleteVolumeRequest; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DeleteVolumeRequest; + + /** + * Verifies a DeleteVolumeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteVolumeRequest; + + /** + * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. + * @param message DeleteVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RevertVolumeRequest. */ + interface IRevertVolumeRequest { + + /** RevertVolumeRequest name */ + name?: (string|null); + + /** RevertVolumeRequest snapshotId */ + snapshotId?: (string|null); + } + + /** Represents a RevertVolumeRequest. */ + class RevertVolumeRequest implements IRevertVolumeRequest { + + /** + * Constructs a new RevertVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IRevertVolumeRequest); + + /** RevertVolumeRequest name. */ + public name: string; + + /** RevertVolumeRequest snapshotId. */ + public snapshotId: string; + + /** + * Creates a new RevertVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RevertVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IRevertVolumeRequest): google.cloud.netapp.v1.RevertVolumeRequest; + + /** + * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @param message RevertVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IRevertVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @param message RevertVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IRevertVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.RevertVolumeRequest; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.RevertVolumeRequest; + + /** + * Verifies a RevertVolumeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevertVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RevertVolumeRequest; + + /** + * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. + * @param message RevertVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.RevertVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevertVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevertVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Volume. */ + interface IVolume { + + /** Volume name */ + name?: (string|null); + + /** Volume state */ + state?: (google.cloud.netapp.v1.Volume.State|keyof typeof google.cloud.netapp.v1.Volume.State|null); + + /** Volume stateDetails */ + stateDetails?: (string|null); + + /** Volume createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Volume shareName */ + shareName?: (string|null); + + /** Volume psaRange */ + psaRange?: (string|null); + + /** Volume storagePool */ + storagePool?: (string|null); + + /** Volume network */ + network?: (string|null); + + /** Volume serviceLevel */ + serviceLevel?: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel|null); + + /** Volume capacityGib */ + capacityGib?: (number|Long|string|null); + + /** Volume exportPolicy */ + exportPolicy?: (google.cloud.netapp.v1.IExportPolicy|null); + + /** Volume protocols */ + protocols?: (google.cloud.netapp.v1.Protocols[]|null); + + /** Volume smbSettings */ + smbSettings?: (google.cloud.netapp.v1.SMBSettings[]|null); + + /** Volume mountOptions */ + mountOptions?: (google.cloud.netapp.v1.IMountOption[]|null); + + /** Volume unixPermissions */ + unixPermissions?: (string|null); + + /** Volume labels */ + labels?: ({ [k: string]: string }|null); + + /** Volume description */ + description?: (string|null); + + /** Volume snapshotPolicy */ + snapshotPolicy?: (google.cloud.netapp.v1.ISnapshotPolicy|null); + + /** Volume snapReserve */ + snapReserve?: (number|null); + + /** Volume snapshotDirectory */ + snapshotDirectory?: (boolean|null); + + /** Volume usedGib */ + usedGib?: (number|Long|string|null); + + /** Volume securityStyle */ + securityStyle?: (google.cloud.netapp.v1.SecurityStyle|keyof typeof google.cloud.netapp.v1.SecurityStyle|null); + + /** Volume kerberosEnabled */ + kerberosEnabled?: (boolean|null); + + /** Volume ldapEnabled */ + ldapEnabled?: (boolean|null); + + /** Volume activeDirectory */ + activeDirectory?: (string|null); + + /** Volume restoreParameters */ + restoreParameters?: (google.cloud.netapp.v1.IRestoreParameters|null); + + /** Volume kmsConfig */ + kmsConfig?: (string|null); + + /** Volume encryptionType */ + encryptionType?: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType|null); + + /** Volume hasReplication */ + hasReplication?: (boolean|null); + + /** Volume restrictedActions */ + restrictedActions?: (google.cloud.netapp.v1.RestrictedAction[]|null); + } + + /** Represents a Volume. */ + class Volume implements IVolume { + + /** + * Constructs a new Volume. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IVolume); + + /** Volume name. */ + public name: string; + + /** Volume state. */ + public state: (google.cloud.netapp.v1.Volume.State|keyof typeof google.cloud.netapp.v1.Volume.State); + + /** Volume stateDetails. */ + public stateDetails: string; + + /** Volume createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Volume shareName. */ + public shareName: string; + + /** Volume psaRange. */ + public psaRange: string; + + /** Volume storagePool. */ + public storagePool: string; + + /** Volume network. */ + public network: string; + + /** Volume serviceLevel. */ + public serviceLevel: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel); + + /** Volume capacityGib. */ + public capacityGib: (number|Long|string); + + /** Volume exportPolicy. */ + public exportPolicy?: (google.cloud.netapp.v1.IExportPolicy|null); + + /** Volume protocols. */ + public protocols: google.cloud.netapp.v1.Protocols[]; + + /** Volume smbSettings. */ + public smbSettings: google.cloud.netapp.v1.SMBSettings[]; + + /** Volume mountOptions. */ + public mountOptions: google.cloud.netapp.v1.IMountOption[]; + + /** Volume unixPermissions. */ + public unixPermissions: string; + + /** Volume labels. */ + public labels: { [k: string]: string }; + + /** Volume description. */ + public description: string; + + /** Volume snapshotPolicy. */ + public snapshotPolicy?: (google.cloud.netapp.v1.ISnapshotPolicy|null); + + /** Volume snapReserve. */ + public snapReserve: number; + + /** Volume snapshotDirectory. */ + public snapshotDirectory: boolean; + + /** Volume usedGib. */ + public usedGib: (number|Long|string); + + /** Volume securityStyle. */ + public securityStyle: (google.cloud.netapp.v1.SecurityStyle|keyof typeof google.cloud.netapp.v1.SecurityStyle); + + /** Volume kerberosEnabled. */ + public kerberosEnabled: boolean; + + /** Volume ldapEnabled. */ + public ldapEnabled: boolean; + + /** Volume activeDirectory. */ + public activeDirectory: string; + + /** Volume restoreParameters. */ + public restoreParameters?: (google.cloud.netapp.v1.IRestoreParameters|null); + + /** Volume kmsConfig. */ + public kmsConfig: string; + + /** Volume encryptionType. */ + public encryptionType: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType); + + /** Volume hasReplication. */ + public hasReplication: boolean; + + /** Volume restrictedActions. */ + public restrictedActions: google.cloud.netapp.v1.RestrictedAction[]; + + /** + * Creates a new Volume instance using the specified properties. + * @param [properties] Properties to set + * @returns Volume instance + */ + public static create(properties?: google.cloud.netapp.v1.IVolume): google.cloud.netapp.v1.Volume; + + /** + * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @param message Volume message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @param message Volume message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Volume message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.Volume; + + /** + * Decodes a Volume message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.Volume; + + /** + * Verifies a Volume message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Volume message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Volume + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Volume; + + /** + * Creates a plain object from a Volume message. Also converts values to other types if specified. + * @param message Volume + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Volume, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Volume to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Volume + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Volume { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + RESTORING = 5, + DISABLED = 6, + ERROR = 7 + } + } + + /** Properties of an ExportPolicy. */ + interface IExportPolicy { + + /** ExportPolicy rules */ + rules?: (google.cloud.netapp.v1.ISimpleExportPolicyRule[]|null); + } + + /** Represents an ExportPolicy. */ + class ExportPolicy implements IExportPolicy { + + /** + * Constructs a new ExportPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExportPolicy); + + /** ExportPolicy rules. */ + public rules: google.cloud.netapp.v1.ISimpleExportPolicyRule[]; + + /** + * Creates a new ExportPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportPolicy instance + */ + public static create(properties?: google.cloud.netapp.v1.IExportPolicy): google.cloud.netapp.v1.ExportPolicy; + + /** + * Encodes the specified ExportPolicy message. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @param message ExportPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @param message ExportPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ExportPolicy; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ExportPolicy; + + /** + * Verifies an ExportPolicy message. + * @param message Plain 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 ExportPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExportPolicy; + + /** + * Creates a plain object from an ExportPolicy message. Also converts values to other types if specified. + * @param message ExportPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExportPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SimpleExportPolicyRule. */ + interface ISimpleExportPolicyRule { + + /** SimpleExportPolicyRule allowedClients */ + allowedClients?: (string|null); + + /** SimpleExportPolicyRule hasRootAccess */ + hasRootAccess?: (string|null); + + /** SimpleExportPolicyRule accessType */ + accessType?: (google.cloud.netapp.v1.AccessType|keyof typeof google.cloud.netapp.v1.AccessType|null); + + /** SimpleExportPolicyRule nfsv3 */ + nfsv3?: (boolean|null); + + /** SimpleExportPolicyRule nfsv4 */ + nfsv4?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadOnly */ + kerberos_5ReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadWrite */ + kerberos_5ReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadOnly */ + kerberos_5iReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadWrite */ + kerberos_5iReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadOnly */ + kerberos_5pReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadWrite */ + kerberos_5pReadWrite?: (boolean|null); + } + + /** Represents a SimpleExportPolicyRule. */ + class SimpleExportPolicyRule implements ISimpleExportPolicyRule { + + /** + * Constructs a new SimpleExportPolicyRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISimpleExportPolicyRule); + + /** SimpleExportPolicyRule allowedClients. */ + public allowedClients?: (string|null); + + /** SimpleExportPolicyRule hasRootAccess. */ + public hasRootAccess?: (string|null); + + /** SimpleExportPolicyRule accessType. */ + public accessType?: (google.cloud.netapp.v1.AccessType|keyof typeof google.cloud.netapp.v1.AccessType|null); + + /** SimpleExportPolicyRule nfsv3. */ + public nfsv3?: (boolean|null); + + /** SimpleExportPolicyRule nfsv4. */ + public nfsv4?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadOnly. */ + public kerberos_5ReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadWrite. */ + public kerberos_5ReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadOnly. */ + public kerberos_5iReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadWrite. */ + public kerberos_5iReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadOnly. */ + public kerberos_5pReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadWrite. */ + public kerberos_5pReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule _allowedClients. */ + public _allowedClients?: "allowedClients"; + + /** SimpleExportPolicyRule _hasRootAccess. */ + public _hasRootAccess?: "hasRootAccess"; + + /** SimpleExportPolicyRule _accessType. */ + public _accessType?: "accessType"; + + /** SimpleExportPolicyRule _nfsv3. */ + public _nfsv3?: "nfsv3"; + + /** SimpleExportPolicyRule _nfsv4. */ + public _nfsv4?: "nfsv4"; + + /** SimpleExportPolicyRule _kerberos_5ReadOnly. */ + public _kerberos_5ReadOnly?: "kerberos_5ReadOnly"; + + /** SimpleExportPolicyRule _kerberos_5ReadWrite. */ + public _kerberos_5ReadWrite?: "kerberos_5ReadWrite"; + + /** SimpleExportPolicyRule _kerberos_5iReadOnly. */ + public _kerberos_5iReadOnly?: "kerberos_5iReadOnly"; + + /** SimpleExportPolicyRule _kerberos_5iReadWrite. */ + public _kerberos_5iReadWrite?: "kerberos_5iReadWrite"; + + /** SimpleExportPolicyRule _kerberos_5pReadOnly. */ + public _kerberos_5pReadOnly?: "kerberos_5pReadOnly"; + + /** SimpleExportPolicyRule _kerberos_5pReadWrite. */ + public _kerberos_5pReadWrite?: "kerberos_5pReadWrite"; + + /** + * Creates a new SimpleExportPolicyRule instance using the specified properties. + * @param [properties] Properties to set + * @returns SimpleExportPolicyRule instance + */ + public static create(properties?: google.cloud.netapp.v1.ISimpleExportPolicyRule): google.cloud.netapp.v1.SimpleExportPolicyRule; + + /** + * Encodes the specified SimpleExportPolicyRule message. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @param message SimpleExportPolicyRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISimpleExportPolicyRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimpleExportPolicyRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @param message SimpleExportPolicyRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISimpleExportPolicyRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimpleExportPolicyRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.SimpleExportPolicyRule; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimpleExportPolicyRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.SimpleExportPolicyRule; + + /** + * Verifies a SimpleExportPolicyRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimpleExportPolicyRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimpleExportPolicyRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SimpleExportPolicyRule; + + /** + * Creates a plain object from a SimpleExportPolicyRule message. Also converts values to other types if specified. + * @param message SimpleExportPolicyRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.SimpleExportPolicyRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimpleExportPolicyRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimpleExportPolicyRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SnapshotPolicy. */ + interface ISnapshotPolicy { + + /** SnapshotPolicy enabled */ + enabled?: (boolean|null); + + /** SnapshotPolicy hourlySchedule */ + hourlySchedule?: (google.cloud.netapp.v1.IHourlySchedule|null); + + /** SnapshotPolicy dailySchedule */ + dailySchedule?: (google.cloud.netapp.v1.IDailySchedule|null); + + /** SnapshotPolicy weeklySchedule */ + weeklySchedule?: (google.cloud.netapp.v1.IWeeklySchedule|null); + + /** SnapshotPolicy monthlySchedule */ + monthlySchedule?: (google.cloud.netapp.v1.IMonthlySchedule|null); + } + + /** Represents a SnapshotPolicy. */ + class SnapshotPolicy implements ISnapshotPolicy { + + /** + * Constructs a new SnapshotPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISnapshotPolicy); + + /** SnapshotPolicy enabled. */ + public enabled?: (boolean|null); + + /** SnapshotPolicy hourlySchedule. */ + public hourlySchedule?: (google.cloud.netapp.v1.IHourlySchedule|null); + + /** SnapshotPolicy dailySchedule. */ + public dailySchedule?: (google.cloud.netapp.v1.IDailySchedule|null); + + /** SnapshotPolicy weeklySchedule. */ + public weeklySchedule?: (google.cloud.netapp.v1.IWeeklySchedule|null); + + /** SnapshotPolicy monthlySchedule. */ + public monthlySchedule?: (google.cloud.netapp.v1.IMonthlySchedule|null); + + /** SnapshotPolicy _enabled. */ + public _enabled?: "enabled"; + + /** SnapshotPolicy _hourlySchedule. */ + public _hourlySchedule?: "hourlySchedule"; + + /** SnapshotPolicy _dailySchedule. */ + public _dailySchedule?: "dailySchedule"; + + /** SnapshotPolicy _weeklySchedule. */ + public _weeklySchedule?: "weeklySchedule"; + + /** SnapshotPolicy _monthlySchedule. */ + public _monthlySchedule?: "monthlySchedule"; + + /** + * Creates a new SnapshotPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns SnapshotPolicy instance + */ + public static create(properties?: google.cloud.netapp.v1.ISnapshotPolicy): google.cloud.netapp.v1.SnapshotPolicy; + + /** + * Encodes the specified SnapshotPolicy message. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @param message SnapshotPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISnapshotPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SnapshotPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @param message SnapshotPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISnapshotPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SnapshotPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.SnapshotPolicy; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SnapshotPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.SnapshotPolicy; + + /** + * Verifies a SnapshotPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SnapshotPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SnapshotPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SnapshotPolicy; + + /** + * Creates a plain object from a SnapshotPolicy message. Also converts values to other types if specified. + * @param message SnapshotPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.SnapshotPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SnapshotPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SnapshotPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an HourlySchedule. */ + interface IHourlySchedule { + + /** HourlySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** HourlySchedule minute */ + minute?: (number|null); + } + + /** Represents an HourlySchedule. */ + class HourlySchedule implements IHourlySchedule { + + /** + * Constructs a new HourlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IHourlySchedule); + + /** HourlySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** HourlySchedule minute. */ + public minute?: (number|null); + + /** HourlySchedule _snapshotsToKeep. */ + public _snapshotsToKeep?: "snapshotsToKeep"; + + /** HourlySchedule _minute. */ + public _minute?: "minute"; + + /** + * Creates a new HourlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns HourlySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IHourlySchedule): google.cloud.netapp.v1.HourlySchedule; + + /** + * Encodes the specified HourlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @param message HourlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IHourlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HourlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @param message HourlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IHourlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HourlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.HourlySchedule; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HourlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.HourlySchedule; + + /** + * Verifies an HourlySchedule message. + * @param message Plain 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 HourlySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HourlySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HourlySchedule; + + /** + * Creates a plain object from an HourlySchedule message. Also converts values to other types if specified. + * @param message HourlySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.HourlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HourlySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HourlySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DailySchedule. */ + interface IDailySchedule { + + /** DailySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** DailySchedule minute */ + minute?: (number|null); + + /** DailySchedule hour */ + hour?: (number|null); + } + + /** Represents a DailySchedule. */ + class DailySchedule implements IDailySchedule { + + /** + * Constructs a new DailySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDailySchedule); + + /** DailySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** DailySchedule minute. */ + public minute?: (number|null); + + /** DailySchedule hour. */ + public hour?: (number|null); + + /** DailySchedule _snapshotsToKeep. */ + public _snapshotsToKeep?: "snapshotsToKeep"; + + /** DailySchedule _minute. */ + public _minute?: "minute"; + + /** DailySchedule _hour. */ + public _hour?: "hour"; + + /** + * Creates a new DailySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns DailySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IDailySchedule): google.cloud.netapp.v1.DailySchedule; + + /** + * Encodes the specified DailySchedule message. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @param message DailySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDailySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DailySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @param message DailySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDailySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DailySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DailySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.DailySchedule; + + /** + * Decodes a DailySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DailySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.DailySchedule; + + /** + * Verifies a DailySchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DailySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DailySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DailySchedule; + + /** + * Creates a plain object from a DailySchedule message. Also converts values to other types if specified. + * @param message DailySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DailySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DailySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DailySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WeeklySchedule. */ + interface IWeeklySchedule { + + /** WeeklySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** WeeklySchedule minute */ + minute?: (number|null); + + /** WeeklySchedule hour */ + hour?: (number|null); + + /** WeeklySchedule day */ + day?: (string|null); + } + + /** Represents a WeeklySchedule. */ + class WeeklySchedule implements IWeeklySchedule { + + /** + * Constructs a new WeeklySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IWeeklySchedule); + + /** WeeklySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** WeeklySchedule minute. */ + public minute?: (number|null); + + /** WeeklySchedule hour. */ + public hour?: (number|null); + + /** WeeklySchedule day. */ + public day?: (string|null); + + /** WeeklySchedule _snapshotsToKeep. */ + public _snapshotsToKeep?: "snapshotsToKeep"; + + /** WeeklySchedule _minute. */ + public _minute?: "minute"; + + /** WeeklySchedule _hour. */ + public _hour?: "hour"; + + /** WeeklySchedule _day. */ + public _day?: "day"; + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns WeeklySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IWeeklySchedule): google.cloud.netapp.v1.WeeklySchedule; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.netapp.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.netapp.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.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.netapp.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.netapp.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.netapp.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.netapp.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.netapp.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeeklySchedule to JSON. + * @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. */ + interface IMonthlySchedule { + + /** MonthlySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** MonthlySchedule minute */ + minute?: (number|null); + + /** MonthlySchedule hour */ + hour?: (number|null); + + /** MonthlySchedule daysOfMonth */ + daysOfMonth?: (string|null); + } + + /** Represents a MonthlySchedule. */ + class MonthlySchedule implements IMonthlySchedule { + + /** + * Constructs a new MonthlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IMonthlySchedule); + + /** MonthlySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** MonthlySchedule minute. */ + public minute?: (number|null); + + /** MonthlySchedule hour. */ + public hour?: (number|null); + + /** MonthlySchedule daysOfMonth. */ + public daysOfMonth?: (string|null); + + /** MonthlySchedule _snapshotsToKeep. */ + public _snapshotsToKeep?: "snapshotsToKeep"; + + /** MonthlySchedule _minute. */ + public _minute?: "minute"; + + /** MonthlySchedule _hour. */ + public _hour?: "hour"; + + /** MonthlySchedule _daysOfMonth. */ + public _daysOfMonth?: "daysOfMonth"; + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns MonthlySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IMonthlySchedule): google.cloud.netapp.v1.MonthlySchedule; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.netapp.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.netapp.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.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.netapp.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.netapp.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.netapp.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.netapp.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.netapp.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonthlySchedule to JSON. + * @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 MountOption. */ + interface IMountOption { + + /** MountOption export */ + "export"?: (string|null); + + /** MountOption exportFull */ + exportFull?: (string|null); + + /** MountOption protocol */ + protocol?: (google.cloud.netapp.v1.Protocols|keyof typeof google.cloud.netapp.v1.Protocols|null); + + /** MountOption instructions */ + instructions?: (string|null); + } + + /** Represents a MountOption. */ + class MountOption implements IMountOption { + + /** + * Constructs a new MountOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IMountOption); + + /** MountOption export. */ + public export: string; + + /** MountOption exportFull. */ + public exportFull: string; + + /** MountOption protocol. */ + public protocol: (google.cloud.netapp.v1.Protocols|keyof typeof google.cloud.netapp.v1.Protocols); + + /** MountOption instructions. */ + public instructions: string; + + /** + * Creates a new MountOption instance using the specified properties. + * @param [properties] Properties to set + * @returns MountOption instance + */ + public static create(properties?: google.cloud.netapp.v1.IMountOption): google.cloud.netapp.v1.MountOption; + + /** + * Encodes the specified MountOption message. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @param message MountOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IMountOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MountOption message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @param message MountOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IMountOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MountOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MountOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.MountOption; + + /** + * Decodes a MountOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MountOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.MountOption; + + /** + * Verifies a MountOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MountOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MountOption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.MountOption; + + /** + * Creates a plain object from a MountOption message. Also converts values to other types if specified. + * @param message MountOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.MountOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MountOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MountOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreParameters. */ + interface IRestoreParameters { + + /** RestoreParameters sourceSnapshot */ + sourceSnapshot?: (string|null); + } + + /** Represents a RestoreParameters. */ + class RestoreParameters implements IRestoreParameters { + + /** + * Constructs a new RestoreParameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IRestoreParameters); + + /** RestoreParameters sourceSnapshot. */ + public sourceSnapshot?: (string|null); + + /** RestoreParameters source. */ + public source?: "sourceSnapshot"; + + /** + * Creates a new RestoreParameters instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreParameters instance + */ + public static create(properties?: google.cloud.netapp.v1.IRestoreParameters): google.cloud.netapp.v1.RestoreParameters; + + /** + * Encodes the specified RestoreParameters message. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @param message RestoreParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IRestoreParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @param message RestoreParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.RestoreParameters; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.RestoreParameters; + + /** + * Verifies a RestoreParameters message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreParameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreParameters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreParameters; + + /** + * Creates a plain object from a RestoreParameters message. Also converts values to other types if specified. + * @param message RestoreParameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.RestoreParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreParameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreParameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** 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, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (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; + + /** FileDescriptorProto edition. */ + public edition: 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 }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** 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 }; + + /** + * 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. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_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 }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions 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 }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions target */ + target?: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions target. */ + public target: (google.protobuf.FieldOptions.OptionTargetType|keyof typeof google.protobuf.FieldOptions.OptionTargetType); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + } + + /** Properties of an 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 }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions 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 }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions 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 }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|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 }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|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 }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-netapp/protos/protos.js b/packages/google-cloud-netapp/protos/protos.js new file mode 100644 index 000000000000..f3dc5d8f9822 --- /dev/null +++ b/packages/google-cloud-netapp/protos/protos.js @@ -0,0 +1,39210 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_netapp_protos || ($protobuf.roots._google_cloud_netapp_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.netapp = (function() { + + /** + * Namespace netapp. + * @memberof google.cloud + * @namespace + */ + var netapp = {}; + + netapp.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.netapp + * @namespace + */ + var v1 = {}; + + v1.ListActiveDirectoriesRequest = (function() { + + /** + * Properties of a ListActiveDirectoriesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListActiveDirectoriesRequest + * @property {string|null} [parent] ListActiveDirectoriesRequest parent + * @property {number|null} [pageSize] ListActiveDirectoriesRequest pageSize + * @property {string|null} [pageToken] ListActiveDirectoriesRequest pageToken + * @property {string|null} [filter] ListActiveDirectoriesRequest filter + * @property {string|null} [orderBy] ListActiveDirectoriesRequest orderBy + */ + + /** + * Constructs a new ListActiveDirectoriesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListActiveDirectoriesRequest. + * @implements IListActiveDirectoriesRequest + * @constructor + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest=} [properties] Properties to set + */ + function ListActiveDirectoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListActiveDirectoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.parent = ""; + + /** + * ListActiveDirectoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.pageSize = 0; + + /** + * ListActiveDirectoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.pageToken = ""; + + /** + * ListActiveDirectoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.filter = ""; + + /** + * ListActiveDirectoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListActiveDirectoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest instance + */ + ListActiveDirectoriesRequest.create = function create(properties) { + return new ListActiveDirectoriesRequest(properties); + }; + + /** + * Encodes the specified ListActiveDirectoriesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} message ListActiveDirectoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListActiveDirectoriesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} message ListActiveDirectoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest(); + 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 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListActiveDirectoriesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListActiveDirectoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListActiveDirectoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest + */ + ListActiveDirectoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListActiveDirectoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.ListActiveDirectoriesRequest} message ListActiveDirectoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListActiveDirectoriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListActiveDirectoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListActiveDirectoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListActiveDirectoriesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListActiveDirectoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListActiveDirectoriesRequest"; + }; + + return ListActiveDirectoriesRequest; + })(); + + v1.ListActiveDirectoriesResponse = (function() { + + /** + * Properties of a ListActiveDirectoriesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListActiveDirectoriesResponse + * @property {Array.|null} [activeDirectories] ListActiveDirectoriesResponse activeDirectories + * @property {string|null} [nextPageToken] ListActiveDirectoriesResponse nextPageToken + * @property {Array.|null} [unreachable] ListActiveDirectoriesResponse unreachable + */ + + /** + * Constructs a new ListActiveDirectoriesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListActiveDirectoriesResponse. + * @implements IListActiveDirectoriesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse=} [properties] Properties to set + */ + function ListActiveDirectoriesResponse(properties) { + this.activeDirectories = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListActiveDirectoriesResponse activeDirectories. + * @member {Array.} activeDirectories + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + */ + ListActiveDirectoriesResponse.prototype.activeDirectories = $util.emptyArray; + + /** + * ListActiveDirectoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + */ + ListActiveDirectoriesResponse.prototype.nextPageToken = ""; + + /** + * ListActiveDirectoriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + */ + ListActiveDirectoriesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListActiveDirectoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse instance + */ + ListActiveDirectoriesResponse.create = function create(properties) { + return new ListActiveDirectoriesResponse(properties); + }; + + /** + * Encodes the specified ListActiveDirectoriesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse} message ListActiveDirectoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeDirectories != null && message.activeDirectories.length) + for (var i = 0; i < message.activeDirectories.length; ++i) + $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListActiveDirectoriesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse} message ListActiveDirectoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.activeDirectories && message.activeDirectories.length)) + message.activeDirectories = []; + message.activeDirectories.push($root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListActiveDirectoriesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListActiveDirectoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeDirectories != null && message.hasOwnProperty("activeDirectories")) { + if (!Array.isArray(message.activeDirectories)) + return "activeDirectories: array expected"; + for (var i = 0; i < message.activeDirectories.length; ++i) { + var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectories[i]); + if (error) + return "activeDirectories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListActiveDirectoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse + */ + ListActiveDirectoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse(); + if (object.activeDirectories) { + if (!Array.isArray(object.activeDirectories)) + throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.activeDirectories: array expected"); + message.activeDirectories = []; + for (var i = 0; i < object.activeDirectories.length; ++i) { + if (typeof object.activeDirectories[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.activeDirectories: object expected"); + message.activeDirectories[i] = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListActiveDirectoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.ListActiveDirectoriesResponse} message ListActiveDirectoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListActiveDirectoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.activeDirectories = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.activeDirectories && message.activeDirectories.length) { + object.activeDirectories = []; + for (var j = 0; j < message.activeDirectories.length; ++j) + object.activeDirectories[j] = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListActiveDirectoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListActiveDirectoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListActiveDirectoriesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListActiveDirectoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListActiveDirectoriesResponse"; + }; + + return ListActiveDirectoriesResponse; + })(); + + v1.GetActiveDirectoryRequest = (function() { + + /** + * Properties of a GetActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetActiveDirectoryRequest + * @property {string|null} [name] GetActiveDirectoryRequest name + */ + + /** + * Constructs a new GetActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetActiveDirectoryRequest. + * @implements IGetActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest=} [properties] Properties to set + */ + function GetActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetActiveDirectoryRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @instance + */ + GetActiveDirectoryRequest.prototype.name = ""; + + /** + * Creates a new GetActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest instance + */ + GetActiveDirectoryRequest.create = function create(properties) { + return new GetActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified GetActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} message GetActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetActiveDirectoryRequest.encode = function encode(message, writer) { + 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 GetActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} message GetActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetActiveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetActiveDirectoryRequest(); + 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 GetActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetActiveDirectoryRequest.verify = function verify(message) { + if (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 GetActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest + */ + GetActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetActiveDirectoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.GetActiveDirectoryRequest} message GetActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetActiveDirectoryRequest.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 GetActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetActiveDirectoryRequest"; + }; + + return GetActiveDirectoryRequest; + })(); + + v1.CreateActiveDirectoryRequest = (function() { + + /** + * Properties of a CreateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateActiveDirectoryRequest + * @property {string|null} [parent] CreateActiveDirectoryRequest parent + * @property {google.cloud.netapp.v1.IActiveDirectory|null} [activeDirectory] CreateActiveDirectoryRequest activeDirectory + * @property {string|null} [activeDirectoryId] CreateActiveDirectoryRequest activeDirectoryId + */ + + /** + * Constructs a new CreateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateActiveDirectoryRequest. + * @implements ICreateActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest=} [properties] Properties to set + */ + function CreateActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateActiveDirectoryRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + */ + CreateActiveDirectoryRequest.prototype.parent = ""; + + /** + * CreateActiveDirectoryRequest activeDirectory. + * @member {google.cloud.netapp.v1.IActiveDirectory|null|undefined} activeDirectory + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + */ + CreateActiveDirectoryRequest.prototype.activeDirectory = null; + + /** + * CreateActiveDirectoryRequest activeDirectoryId. + * @member {string} activeDirectoryId + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + */ + CreateActiveDirectoryRequest.prototype.activeDirectoryId = ""; + + /** + * Creates a new CreateActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest instance + */ + CreateActiveDirectoryRequest.create = function create(properties) { + return new CreateActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified CreateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} message CreateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateActiveDirectoryRequest.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.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectory, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.activeDirectoryId != null && Object.hasOwnProperty.call(message, "activeDirectoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.activeDirectoryId); + return writer; + }; + + /** + * Encodes the specified CreateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} message CreateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateActiveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32()); + break; + } + case 3: { + message.activeDirectoryId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateActiveDirectoryRequest.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.activeDirectory != null && message.hasOwnProperty("activeDirectory")) { + var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectory); + if (error) + return "activeDirectory." + error; + } + if (message.activeDirectoryId != null && message.hasOwnProperty("activeDirectoryId")) + if (!$util.isString(message.activeDirectoryId)) + return "activeDirectoryId: string expected"; + return null; + }; + + /** + * Creates a CreateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest + */ + CreateActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.activeDirectory != null) { + if (typeof object.activeDirectory !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateActiveDirectoryRequest.activeDirectory: object expected"); + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectory); + } + if (object.activeDirectoryId != null) + message.activeDirectoryId = String(object.activeDirectoryId); + return message; + }; + + /** + * Creates a plain object from a CreateActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.CreateActiveDirectoryRequest} message CreateActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateActiveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.activeDirectory = null; + object.activeDirectoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectory, options); + if (message.activeDirectoryId != null && message.hasOwnProperty("activeDirectoryId")) + object.activeDirectoryId = message.activeDirectoryId; + return object; + }; + + /** + * Converts this CreateActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateActiveDirectoryRequest"; + }; + + return CreateActiveDirectoryRequest; + })(); + + v1.UpdateActiveDirectoryRequest = (function() { + + /** + * Properties of an UpdateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateActiveDirectoryRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateActiveDirectoryRequest updateMask + * @property {google.cloud.netapp.v1.IActiveDirectory|null} [activeDirectory] UpdateActiveDirectoryRequest activeDirectory + */ + + /** + * Constructs a new UpdateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateActiveDirectoryRequest. + * @implements IUpdateActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest=} [properties] Properties to set + */ + function UpdateActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateActiveDirectoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @instance + */ + UpdateActiveDirectoryRequest.prototype.updateMask = null; + + /** + * UpdateActiveDirectoryRequest activeDirectory. + * @member {google.cloud.netapp.v1.IActiveDirectory|null|undefined} activeDirectory + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @instance + */ + UpdateActiveDirectoryRequest.prototype.activeDirectory = null; + + /** + * Creates a new UpdateActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest instance + */ + UpdateActiveDirectoryRequest.create = function create(properties) { + return new UpdateActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateActiveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectory, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateActiveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateActiveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) { + var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectory); + if (error) + return "activeDirectory." + error; + } + return null; + }; + + /** + * Creates an UpdateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest + */ + UpdateActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateActiveDirectoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.activeDirectory != null) { + if (typeof object.activeDirectory !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateActiveDirectoryRequest.activeDirectory: object expected"); + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectory); + } + return message; + }; + + /** + * Creates a plain object from an UpdateActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateActiveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.activeDirectory = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectory, options); + return object; + }; + + /** + * Converts this UpdateActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateActiveDirectoryRequest"; + }; + + return UpdateActiveDirectoryRequest; + })(); + + v1.DeleteActiveDirectoryRequest = (function() { + + /** + * Properties of a DeleteActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteActiveDirectoryRequest + * @property {string|null} [name] DeleteActiveDirectoryRequest name + */ + + /** + * Constructs a new DeleteActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteActiveDirectoryRequest. + * @implements IDeleteActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest=} [properties] Properties to set + */ + function DeleteActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteActiveDirectoryRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @instance + */ + DeleteActiveDirectoryRequest.prototype.name = ""; + + /** + * Creates a new DeleteActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest instance + */ + DeleteActiveDirectoryRequest.create = function create(properties) { + return new DeleteActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified DeleteActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteActiveDirectoryRequest.encode = function encode(message, writer) { + 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 DeleteActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteActiveDirectoryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest(); + 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 DeleteActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteActiveDirectoryRequest.verify = function verify(message) { + if (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 DeleteActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest + */ + DeleteActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteActiveDirectoryRequest.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 DeleteActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteActiveDirectoryRequest"; + }; + + return DeleteActiveDirectoryRequest; + })(); + + v1.ActiveDirectory = (function() { + + /** + * Properties of an ActiveDirectory. + * @memberof google.cloud.netapp.v1 + * @interface IActiveDirectory + * @property {string|null} [name] ActiveDirectory name + * @property {google.protobuf.ITimestamp|null} [createTime] ActiveDirectory createTime + * @property {google.cloud.netapp.v1.ActiveDirectory.State|null} [state] ActiveDirectory state + * @property {string|null} [domain] ActiveDirectory domain + * @property {string|null} [site] ActiveDirectory site + * @property {string|null} [dns] ActiveDirectory dns + * @property {string|null} [netBiosPrefix] ActiveDirectory netBiosPrefix + * @property {string|null} [organizationalUnit] ActiveDirectory organizationalUnit + * @property {boolean|null} [aesEncryption] ActiveDirectory aesEncryption + * @property {string|null} [username] ActiveDirectory username + * @property {string|null} [password] ActiveDirectory password + * @property {Array.|null} [backupOperators] ActiveDirectory backupOperators + * @property {Array.|null} [securityOperators] ActiveDirectory securityOperators + * @property {string|null} [kdcHostname] ActiveDirectory kdcHostname + * @property {string|null} [kdcIp] ActiveDirectory kdcIp + * @property {boolean|null} [nfsUsersWithLdap] ActiveDirectory nfsUsersWithLdap + * @property {string|null} [description] ActiveDirectory description + * @property {boolean|null} [ldapSigning] ActiveDirectory ldapSigning + * @property {boolean|null} [encryptDcConnections] ActiveDirectory encryptDcConnections + * @property {Object.|null} [labels] ActiveDirectory labels + * @property {string|null} [stateDetails] ActiveDirectory stateDetails + */ + + /** + * Constructs a new ActiveDirectory. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ActiveDirectory. + * @implements IActiveDirectory + * @constructor + * @param {google.cloud.netapp.v1.IActiveDirectory=} [properties] Properties to set + */ + function ActiveDirectory(properties) { + this.backupOperators = []; + this.securityOperators = []; + 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]]; + } + + /** + * ActiveDirectory name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.name = ""; + + /** + * ActiveDirectory createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.createTime = null; + + /** + * ActiveDirectory state. + * @member {google.cloud.netapp.v1.ActiveDirectory.State} state + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.state = 0; + + /** + * ActiveDirectory domain. + * @member {string} domain + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.domain = ""; + + /** + * ActiveDirectory site. + * @member {string} site + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.site = ""; + + /** + * ActiveDirectory dns. + * @member {string} dns + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.dns = ""; + + /** + * ActiveDirectory netBiosPrefix. + * @member {string} netBiosPrefix + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.netBiosPrefix = ""; + + /** + * ActiveDirectory organizationalUnit. + * @member {string} organizationalUnit + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.organizationalUnit = ""; + + /** + * ActiveDirectory aesEncryption. + * @member {boolean} aesEncryption + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.aesEncryption = false; + + /** + * ActiveDirectory username. + * @member {string} username + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.username = ""; + + /** + * ActiveDirectory password. + * @member {string} password + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.password = ""; + + /** + * ActiveDirectory backupOperators. + * @member {Array.} backupOperators + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.backupOperators = $util.emptyArray; + + /** + * ActiveDirectory securityOperators. + * @member {Array.} securityOperators + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.securityOperators = $util.emptyArray; + + /** + * ActiveDirectory kdcHostname. + * @member {string} kdcHostname + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.kdcHostname = ""; + + /** + * ActiveDirectory kdcIp. + * @member {string} kdcIp + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.kdcIp = ""; + + /** + * ActiveDirectory nfsUsersWithLdap. + * @member {boolean} nfsUsersWithLdap + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.nfsUsersWithLdap = false; + + /** + * ActiveDirectory description. + * @member {string} description + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.description = ""; + + /** + * ActiveDirectory ldapSigning. + * @member {boolean} ldapSigning + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.ldapSigning = false; + + /** + * ActiveDirectory encryptDcConnections. + * @member {boolean} encryptDcConnections + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.encryptDcConnections = false; + + /** + * ActiveDirectory labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.labels = $util.emptyObject; + + /** + * ActiveDirectory stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.stateDetails = ""; + + /** + * Creates a new ActiveDirectory instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.IActiveDirectory=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory instance + */ + ActiveDirectory.create = function create(properties) { + return new ActiveDirectory(properties); + }; + + /** + * Encodes the specified ActiveDirectory message. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.IActiveDirectory} message ActiveDirectory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveDirectory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.domain); + if (message.site != null && Object.hasOwnProperty.call(message, "site")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.site); + if (message.dns != null && Object.hasOwnProperty.call(message, "dns")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.dns); + if (message.netBiosPrefix != null && Object.hasOwnProperty.call(message, "netBiosPrefix")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.netBiosPrefix); + if (message.organizationalUnit != null && Object.hasOwnProperty.call(message, "organizationalUnit")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.organizationalUnit); + if (message.aesEncryption != null && Object.hasOwnProperty.call(message, "aesEncryption")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.aesEncryption); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.password); + if (message.backupOperators != null && message.backupOperators.length) + for (var i = 0; i < message.backupOperators.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.backupOperators[i]); + if (message.securityOperators != null && message.securityOperators.length) + for (var i = 0; i < message.securityOperators.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.securityOperators[i]); + if (message.kdcHostname != null && Object.hasOwnProperty.call(message, "kdcHostname")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.kdcHostname); + if (message.kdcIp != null && Object.hasOwnProperty.call(message, "kdcIp")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.kdcIp); + if (message.nfsUsersWithLdap != null && Object.hasOwnProperty.call(message, "nfsUsersWithLdap")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.nfsUsersWithLdap); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); + if (message.ldapSigning != null && Object.hasOwnProperty.call(message, "ldapSigning")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.ldapSigning); + if (message.encryptDcConnections != null && Object.hasOwnProperty.call(message, "encryptDcConnections")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.encryptDcConnections); + 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 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.stateDetails); + return writer; + }; + + /** + * Encodes the specified ActiveDirectory message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.IActiveDirectory} message ActiveDirectory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveDirectory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveDirectory.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ActiveDirectory(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.domain = reader.string(); + break; + } + case 5: { + message.site = reader.string(); + break; + } + case 6: { + message.dns = reader.string(); + break; + } + case 7: { + message.netBiosPrefix = reader.string(); + break; + } + case 8: { + message.organizationalUnit = reader.string(); + break; + } + case 9: { + message.aesEncryption = reader.bool(); + break; + } + case 10: { + message.username = reader.string(); + break; + } + case 11: { + message.password = reader.string(); + break; + } + case 12: { + if (!(message.backupOperators && message.backupOperators.length)) + message.backupOperators = []; + message.backupOperators.push(reader.string()); + break; + } + case 13: { + if (!(message.securityOperators && message.securityOperators.length)) + message.securityOperators = []; + message.securityOperators.push(reader.string()); + break; + } + case 14: { + message.kdcHostname = reader.string(); + break; + } + case 15: { + message.kdcIp = reader.string(); + break; + } + case 16: { + message.nfsUsersWithLdap = reader.bool(); + break; + } + case 17: { + message.description = reader.string(); + break; + } + case 18: { + message.ldapSigning = reader.bool(); + break; + } + case 19: { + message.encryptDcConnections = reader.bool(); + break; + } + case 20: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 21: { + message.stateDetails = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveDirectory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveDirectory message. + * @function verify + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveDirectory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.domain != null && message.hasOwnProperty("domain")) + if (!$util.isString(message.domain)) + return "domain: string expected"; + if (message.site != null && message.hasOwnProperty("site")) + if (!$util.isString(message.site)) + return "site: string expected"; + if (message.dns != null && message.hasOwnProperty("dns")) + if (!$util.isString(message.dns)) + return "dns: string expected"; + if (message.netBiosPrefix != null && message.hasOwnProperty("netBiosPrefix")) + if (!$util.isString(message.netBiosPrefix)) + return "netBiosPrefix: string expected"; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + if (!$util.isString(message.organizationalUnit)) + return "organizationalUnit: string expected"; + if (message.aesEncryption != null && message.hasOwnProperty("aesEncryption")) + if (typeof message.aesEncryption !== "boolean") + return "aesEncryption: boolean expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.backupOperators != null && message.hasOwnProperty("backupOperators")) { + if (!Array.isArray(message.backupOperators)) + return "backupOperators: array expected"; + for (var i = 0; i < message.backupOperators.length; ++i) + if (!$util.isString(message.backupOperators[i])) + return "backupOperators: string[] expected"; + } + if (message.securityOperators != null && message.hasOwnProperty("securityOperators")) { + if (!Array.isArray(message.securityOperators)) + return "securityOperators: array expected"; + for (var i = 0; i < message.securityOperators.length; ++i) + if (!$util.isString(message.securityOperators[i])) + return "securityOperators: string[] expected"; + } + if (message.kdcHostname != null && message.hasOwnProperty("kdcHostname")) + if (!$util.isString(message.kdcHostname)) + return "kdcHostname: string expected"; + if (message.kdcIp != null && message.hasOwnProperty("kdcIp")) + if (!$util.isString(message.kdcIp)) + return "kdcIp: string expected"; + if (message.nfsUsersWithLdap != null && message.hasOwnProperty("nfsUsersWithLdap")) + if (typeof message.nfsUsersWithLdap !== "boolean") + return "nfsUsersWithLdap: boolean expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.ldapSigning != null && message.hasOwnProperty("ldapSigning")) + if (typeof message.ldapSigning !== "boolean") + return "ldapSigning: boolean expected"; + if (message.encryptDcConnections != null && message.hasOwnProperty("encryptDcConnections")) + if (typeof message.encryptDcConnections !== "boolean") + return "encryptDcConnections: boolean 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.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + return null; + }; + + /** + * Creates an ActiveDirectory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory + */ + ActiveDirectory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ActiveDirectory) + return object; + var message = new $root.google.cloud.netapp.v1.ActiveDirectory(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "IN_USE": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + } + if (object.domain != null) + message.domain = String(object.domain); + if (object.site != null) + message.site = String(object.site); + if (object.dns != null) + message.dns = String(object.dns); + if (object.netBiosPrefix != null) + message.netBiosPrefix = String(object.netBiosPrefix); + if (object.organizationalUnit != null) + message.organizationalUnit = String(object.organizationalUnit); + if (object.aesEncryption != null) + message.aesEncryption = Boolean(object.aesEncryption); + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.backupOperators) { + if (!Array.isArray(object.backupOperators)) + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.backupOperators: array expected"); + message.backupOperators = []; + for (var i = 0; i < object.backupOperators.length; ++i) + message.backupOperators[i] = String(object.backupOperators[i]); + } + if (object.securityOperators) { + if (!Array.isArray(object.securityOperators)) + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.securityOperators: array expected"); + message.securityOperators = []; + for (var i = 0; i < object.securityOperators.length; ++i) + message.securityOperators[i] = String(object.securityOperators[i]); + } + if (object.kdcHostname != null) + message.kdcHostname = String(object.kdcHostname); + if (object.kdcIp != null) + message.kdcIp = String(object.kdcIp); + if (object.nfsUsersWithLdap != null) + message.nfsUsersWithLdap = Boolean(object.nfsUsersWithLdap); + if (object.description != null) + message.description = String(object.description); + if (object.ldapSigning != null) + message.ldapSigning = Boolean(object.ldapSigning); + if (object.encryptDcConnections != null) + message.encryptDcConnections = Boolean(object.encryptDcConnections); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + return message; + }; + + /** + * Creates a plain object from an ActiveDirectory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.ActiveDirectory} message ActiveDirectory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveDirectory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupOperators = []; + object.securityOperators = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.domain = ""; + object.site = ""; + object.dns = ""; + object.netBiosPrefix = ""; + object.organizationalUnit = ""; + object.aesEncryption = false; + object.username = ""; + object.password = ""; + object.kdcHostname = ""; + object.kdcIp = ""; + object.nfsUsersWithLdap = false; + object.description = ""; + object.ldapSigning = false; + object.encryptDcConnections = false; + object.stateDetails = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.ActiveDirectory.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.ActiveDirectory.State[message.state] : message.state; + if (message.domain != null && message.hasOwnProperty("domain")) + object.domain = message.domain; + if (message.site != null && message.hasOwnProperty("site")) + object.site = message.site; + if (message.dns != null && message.hasOwnProperty("dns")) + object.dns = message.dns; + if (message.netBiosPrefix != null && message.hasOwnProperty("netBiosPrefix")) + object.netBiosPrefix = message.netBiosPrefix; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + object.organizationalUnit = message.organizationalUnit; + if (message.aesEncryption != null && message.hasOwnProperty("aesEncryption")) + object.aesEncryption = message.aesEncryption; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.backupOperators && message.backupOperators.length) { + object.backupOperators = []; + for (var j = 0; j < message.backupOperators.length; ++j) + object.backupOperators[j] = message.backupOperators[j]; + } + if (message.securityOperators && message.securityOperators.length) { + object.securityOperators = []; + for (var j = 0; j < message.securityOperators.length; ++j) + object.securityOperators[j] = message.securityOperators[j]; + } + if (message.kdcHostname != null && message.hasOwnProperty("kdcHostname")) + object.kdcHostname = message.kdcHostname; + if (message.kdcIp != null && message.hasOwnProperty("kdcIp")) + object.kdcIp = message.kdcIp; + if (message.nfsUsersWithLdap != null && message.hasOwnProperty("nfsUsersWithLdap")) + object.nfsUsersWithLdap = message.nfsUsersWithLdap; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.ldapSigning != null && message.hasOwnProperty("ldapSigning")) + object.ldapSigning = message.ldapSigning; + if (message.encryptDcConnections != null && message.hasOwnProperty("encryptDcConnections")) + object.encryptDcConnections = message.encryptDcConnections; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + return object; + }; + + /** + * Converts this ActiveDirectory to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + * @returns {Object.} JSON object + */ + ActiveDirectory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActiveDirectory + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveDirectory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ActiveDirectory"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.ActiveDirectory.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} IN_USE=4 IN_USE value + * @property {number} DELETING=5 DELETING value + * @property {number} ERROR=6 ERROR value + */ + ActiveDirectory.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "IN_USE"] = 4; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + return values; + })(); + + return ActiveDirectory; + })(); + + v1.NetApp = (function() { + + /** + * Constructs a new NetApp service. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a NetApp + * @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 NetApp(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (NetApp.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetApp; + + /** + * Creates new NetApp service using the specified rpc implementation. + * @function create + * @memberof google.cloud.netapp.v1.NetApp + * @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 {NetApp} RPC service. Useful where requests and/or responses are streamed. + */ + NetApp.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listStoragePools}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListStoragePoolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListStoragePoolsResponse} [response] ListStoragePoolsResponse + */ + + /** + * Calls ListStoragePools. + * @function listStoragePools + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} request ListStoragePoolsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListStoragePoolsCallback} callback Node-style callback called with the error, if any, and ListStoragePoolsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listStoragePools = function listStoragePools(request, callback) { + return this.rpcCall(listStoragePools, $root.google.cloud.netapp.v1.ListStoragePoolsRequest, $root.google.cloud.netapp.v1.ListStoragePoolsResponse, request, callback); + }, "name", { value: "ListStoragePools" }); + + /** + * Calls ListStoragePools. + * @function listStoragePools + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} request ListStoragePoolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateStoragePool. + * @function createStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} request CreateStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createStoragePool = function createStoragePool(request, callback) { + return this.rpcCall(createStoragePool, $root.google.cloud.netapp.v1.CreateStoragePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateStoragePool" }); + + /** + * Calls CreateStoragePool. + * @function createStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} request CreateStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.StoragePool} [response] StoragePool + */ + + /** + * Calls GetStoragePool. + * @function getStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} request GetStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetStoragePoolCallback} callback Node-style callback called with the error, if any, and StoragePool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getStoragePool = function getStoragePool(request, callback) { + return this.rpcCall(getStoragePool, $root.google.cloud.netapp.v1.GetStoragePoolRequest, $root.google.cloud.netapp.v1.StoragePool, request, callback); + }, "name", { value: "GetStoragePool" }); + + /** + * Calls GetStoragePool. + * @function getStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} request GetStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateStoragePool. + * @function updateStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} request UpdateStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateStoragePool = function updateStoragePool(request, callback) { + return this.rpcCall(updateStoragePool, $root.google.cloud.netapp.v1.UpdateStoragePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateStoragePool" }); + + /** + * Calls UpdateStoragePool. + * @function updateStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} request UpdateStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteStoragePool. + * @function deleteStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} request DeleteStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteStoragePool = function deleteStoragePool(request, callback) { + return this.rpcCall(deleteStoragePool, $root.google.cloud.netapp.v1.DeleteStoragePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteStoragePool" }); + + /** + * Calls DeleteStoragePool. + * @function deleteStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} request DeleteStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listVolumes}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListVolumesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListVolumesResponse} [response] ListVolumesResponse + */ + + /** + * Calls ListVolumes. + * @function listVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListVolumesRequest} request ListVolumesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListVolumesCallback} callback Node-style callback called with the error, if any, and ListVolumesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listVolumes = function listVolumes(request, callback) { + return this.rpcCall(listVolumes, $root.google.cloud.netapp.v1.ListVolumesRequest, $root.google.cloud.netapp.v1.ListVolumesResponse, request, callback); + }, "name", { value: "ListVolumes" }); + + /** + * Calls ListVolumes. + * @function listVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListVolumesRequest} request ListVolumesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.Volume} [response] Volume + */ + + /** + * Calls GetVolume. + * @function getVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetVolumeRequest} request GetVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetVolumeCallback} callback Node-style callback called with the error, if any, and Volume + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getVolume = function getVolume(request, callback) { + return this.rpcCall(getVolume, $root.google.cloud.netapp.v1.GetVolumeRequest, $root.google.cloud.netapp.v1.Volume, request, callback); + }, "name", { value: "GetVolume" }); + + /** + * Calls GetVolume. + * @function getVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetVolumeRequest} request GetVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateVolume. + * @function createVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} request CreateVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createVolume = function createVolume(request, callback) { + return this.rpcCall(createVolume, $root.google.cloud.netapp.v1.CreateVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateVolume" }); + + /** + * Calls CreateVolume. + * @function createVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} request CreateVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateVolume. + * @function updateVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} request UpdateVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateVolume = function updateVolume(request, callback) { + return this.rpcCall(updateVolume, $root.google.cloud.netapp.v1.UpdateVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateVolume" }); + + /** + * Calls UpdateVolume. + * @function updateVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} request UpdateVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteVolume. + * @function deleteVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} request DeleteVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteVolume = function deleteVolume(request, callback) { + return this.rpcCall(deleteVolume, $root.google.cloud.netapp.v1.DeleteVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteVolume" }); + + /** + * Calls DeleteVolume. + * @function deleteVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} request DeleteVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|revertVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef RevertVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RevertVolume. + * @function revertVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} request RevertVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.RevertVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.revertVolume = function revertVolume(request, callback) { + return this.rpcCall(revertVolume, $root.google.cloud.netapp.v1.RevertVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RevertVolume" }); + + /** + * Calls RevertVolume. + * @function revertVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} request RevertVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListSnapshotsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListSnapshotsResponse} [response] ListSnapshotsResponse + */ + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ListSnapshotsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listSnapshots = function listSnapshots(request, callback) { + return this.rpcCall(listSnapshots, $root.google.cloud.netapp.v1.ListSnapshotsRequest, $root.google.cloud.netapp.v1.ListSnapshotsResponse, request, callback); + }, "name", { value: "ListSnapshots" }); + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.Snapshot} [response] Snapshot + */ + + /** + * Calls GetSnapshot. + * @function getSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetSnapshotCallback} callback Node-style callback called with the error, if any, and Snapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getSnapshot = function getSnapshot(request, callback) { + return this.rpcCall(getSnapshot, $root.google.cloud.netapp.v1.GetSnapshotRequest, $root.google.cloud.netapp.v1.Snapshot, request, callback); + }, "name", { value: "GetSnapshot" }); + + /** + * Calls GetSnapshot. + * @function getSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateSnapshot. + * @function createSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createSnapshot = function createSnapshot(request, callback) { + return this.rpcCall(createSnapshot, $root.google.cloud.netapp.v1.CreateSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateSnapshot" }); + + /** + * Calls CreateSnapshot. + * @function createSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteSnapshot. + * @function deleteSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteSnapshot = function deleteSnapshot(request, callback) { + return this.rpcCall(deleteSnapshot, $root.google.cloud.netapp.v1.DeleteSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteSnapshot" }); + + /** + * Calls DeleteSnapshot. + * @function deleteSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateSnapshot. + * @function updateSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateSnapshot = function updateSnapshot(request, callback) { + return this.rpcCall(updateSnapshot, $root.google.cloud.netapp.v1.UpdateSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateSnapshot" }); + + /** + * Calls UpdateSnapshot. + * @function updateSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listActiveDirectories}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListActiveDirectoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListActiveDirectoriesResponse} [response] ListActiveDirectoriesResponse + */ + + /** + * Calls ListActiveDirectories. + * @function listActiveDirectories + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} request ListActiveDirectoriesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListActiveDirectoriesCallback} callback Node-style callback called with the error, if any, and ListActiveDirectoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listActiveDirectories = function listActiveDirectories(request, callback) { + return this.rpcCall(listActiveDirectories, $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest, $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse, request, callback); + }, "name", { value: "ListActiveDirectories" }); + + /** + * Calls ListActiveDirectories. + * @function listActiveDirectories + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} request ListActiveDirectoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ActiveDirectory} [response] ActiveDirectory + */ + + /** + * Calls GetActiveDirectory. + * @function getActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} request GetActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetActiveDirectoryCallback} callback Node-style callback called with the error, if any, and ActiveDirectory + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getActiveDirectory = function getActiveDirectory(request, callback) { + return this.rpcCall(getActiveDirectory, $root.google.cloud.netapp.v1.GetActiveDirectoryRequest, $root.google.cloud.netapp.v1.ActiveDirectory, request, callback); + }, "name", { value: "GetActiveDirectory" }); + + /** + * Calls GetActiveDirectory. + * @function getActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} request GetActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateActiveDirectory. + * @function createActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} request CreateActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createActiveDirectory = function createActiveDirectory(request, callback) { + return this.rpcCall(createActiveDirectory, $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateActiveDirectory" }); + + /** + * Calls CreateActiveDirectory. + * @function createActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} request CreateActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateActiveDirectory. + * @function updateActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} request UpdateActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateActiveDirectory = function updateActiveDirectory(request, callback) { + return this.rpcCall(updateActiveDirectory, $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateActiveDirectory" }); + + /** + * Calls UpdateActiveDirectory. + * @function updateActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} request UpdateActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteActiveDirectory. + * @function deleteActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} request DeleteActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteActiveDirectory = function deleteActiveDirectory(request, callback) { + return this.rpcCall(deleteActiveDirectory, $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteActiveDirectory" }); + + /** + * Calls DeleteActiveDirectory. + * @function deleteActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} request DeleteActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listKmsConfigs}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListKmsConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListKmsConfigsResponse} [response] ListKmsConfigsResponse + */ + + /** + * Calls ListKmsConfigs. + * @function listKmsConfigs + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} request ListKmsConfigsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListKmsConfigsCallback} callback Node-style callback called with the error, if any, and ListKmsConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listKmsConfigs = function listKmsConfigs(request, callback) { + return this.rpcCall(listKmsConfigs, $root.google.cloud.netapp.v1.ListKmsConfigsRequest, $root.google.cloud.netapp.v1.ListKmsConfigsResponse, request, callback); + }, "name", { value: "ListKmsConfigs" }); + + /** + * Calls ListKmsConfigs. + * @function listKmsConfigs + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} request ListKmsConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateKmsConfig. + * @function createKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} request CreateKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createKmsConfig = function createKmsConfig(request, callback) { + return this.rpcCall(createKmsConfig, $root.google.cloud.netapp.v1.CreateKmsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateKmsConfig" }); + + /** + * Calls CreateKmsConfig. + * @function createKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} request CreateKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.KmsConfig} [response] KmsConfig + */ + + /** + * Calls GetKmsConfig. + * @function getKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} request GetKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetKmsConfigCallback} callback Node-style callback called with the error, if any, and KmsConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getKmsConfig = function getKmsConfig(request, callback) { + return this.rpcCall(getKmsConfig, $root.google.cloud.netapp.v1.GetKmsConfigRequest, $root.google.cloud.netapp.v1.KmsConfig, request, callback); + }, "name", { value: "GetKmsConfig" }); + + /** + * Calls GetKmsConfig. + * @function getKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} request GetKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateKmsConfig. + * @function updateKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} request UpdateKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateKmsConfig = function updateKmsConfig(request, callback) { + return this.rpcCall(updateKmsConfig, $root.google.cloud.netapp.v1.UpdateKmsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateKmsConfig" }); + + /** + * Calls UpdateKmsConfig. + * @function updateKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} request UpdateKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|encryptVolumes}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef EncryptVolumesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EncryptVolumes. + * @function encryptVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} request EncryptVolumesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.EncryptVolumesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.encryptVolumes = function encryptVolumes(request, callback) { + return this.rpcCall(encryptVolumes, $root.google.cloud.netapp.v1.EncryptVolumesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EncryptVolumes" }); + + /** + * Calls EncryptVolumes. + * @function encryptVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} request EncryptVolumesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|verifyKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef VerifyKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.VerifyKmsConfigResponse} [response] VerifyKmsConfigResponse + */ + + /** + * Calls VerifyKmsConfig. + * @function verifyKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} request VerifyKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.VerifyKmsConfigCallback} callback Node-style callback called with the error, if any, and VerifyKmsConfigResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.verifyKmsConfig = function verifyKmsConfig(request, callback) { + return this.rpcCall(verifyKmsConfig, $root.google.cloud.netapp.v1.VerifyKmsConfigRequest, $root.google.cloud.netapp.v1.VerifyKmsConfigResponse, request, callback); + }, "name", { value: "VerifyKmsConfig" }); + + /** + * Calls VerifyKmsConfig. + * @function verifyKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} request VerifyKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteKmsConfig. + * @function deleteKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} request DeleteKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteKmsConfig = function deleteKmsConfig(request, callback) { + return this.rpcCall(deleteKmsConfig, $root.google.cloud.netapp.v1.DeleteKmsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteKmsConfig" }); + + /** + * Calls DeleteKmsConfig. + * @function deleteKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} request DeleteKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listReplications}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListReplicationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListReplicationsResponse} [response] ListReplicationsResponse + */ + + /** + * Calls ListReplications. + * @function listReplications + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListReplicationsRequest} request ListReplicationsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListReplicationsCallback} callback Node-style callback called with the error, if any, and ListReplicationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listReplications = function listReplications(request, callback) { + return this.rpcCall(listReplications, $root.google.cloud.netapp.v1.ListReplicationsRequest, $root.google.cloud.netapp.v1.ListReplicationsResponse, request, callback); + }, "name", { value: "ListReplications" }); + + /** + * Calls ListReplications. + * @function listReplications + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListReplicationsRequest} request ListReplicationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.Replication} [response] Replication + */ + + /** + * Calls GetReplication. + * @function getReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetReplicationRequest} request GetReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetReplicationCallback} callback Node-style callback called with the error, if any, and Replication + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getReplication = function getReplication(request, callback) { + return this.rpcCall(getReplication, $root.google.cloud.netapp.v1.GetReplicationRequest, $root.google.cloud.netapp.v1.Replication, request, callback); + }, "name", { value: "GetReplication" }); + + /** + * Calls GetReplication. + * @function getReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetReplicationRequest} request GetReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateReplication. + * @function createReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} request CreateReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createReplication = function createReplication(request, callback) { + return this.rpcCall(createReplication, $root.google.cloud.netapp.v1.CreateReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateReplication" }); + + /** + * Calls CreateReplication. + * @function createReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} request CreateReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteReplication. + * @function deleteReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} request DeleteReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteReplication = function deleteReplication(request, callback) { + return this.rpcCall(deleteReplication, $root.google.cloud.netapp.v1.DeleteReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteReplication" }); + + /** + * Calls DeleteReplication. + * @function deleteReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} request DeleteReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateReplication. + * @function updateReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} request UpdateReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateReplication = function updateReplication(request, callback) { + return this.rpcCall(updateReplication, $root.google.cloud.netapp.v1.UpdateReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateReplication" }); + + /** + * Calls UpdateReplication. + * @function updateReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} request UpdateReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|stopReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef StopReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls StopReplication. + * @function stopReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IStopReplicationRequest} request StopReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.StopReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.stopReplication = function stopReplication(request, callback) { + return this.rpcCall(stopReplication, $root.google.cloud.netapp.v1.StopReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "StopReplication" }); + + /** + * Calls StopReplication. + * @function stopReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IStopReplicationRequest} request StopReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|resumeReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ResumeReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ResumeReplication. + * @function resumeReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} request ResumeReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ResumeReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.resumeReplication = function resumeReplication(request, callback) { + return this.rpcCall(resumeReplication, $root.google.cloud.netapp.v1.ResumeReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ResumeReplication" }); + + /** + * Calls ResumeReplication. + * @function resumeReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} request ResumeReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|reverseReplicationDirection}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ReverseReplicationDirectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ReverseReplicationDirection. + * @function reverseReplicationDirection + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} request ReverseReplicationDirectionRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ReverseReplicationDirectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.reverseReplicationDirection = function reverseReplicationDirection(request, callback) { + return this.rpcCall(reverseReplicationDirection, $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ReverseReplicationDirection" }); + + /** + * Calls ReverseReplicationDirection. + * @function reverseReplicationDirection + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} request ReverseReplicationDirectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return NetApp; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.netapp.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.netapp.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.netapp.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.netapp.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.GetKmsConfigRequest = (function() { + + /** + * Properties of a GetKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetKmsConfigRequest + * @property {string|null} [name] GetKmsConfigRequest name + */ + + /** + * Constructs a new GetKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetKmsConfigRequest. + * @implements IGetKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest=} [properties] Properties to set + */ + function GetKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetKmsConfigRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @instance + */ + GetKmsConfigRequest.prototype.name = ""; + + /** + * Creates a new GetKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest instance + */ + GetKmsConfigRequest.create = function create(properties) { + return new GetKmsConfigRequest(properties); + }; + + /** + * Encodes the specified GetKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} message GetKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetKmsConfigRequest.encode = function encode(message, writer) { + 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 GetKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} message GetKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetKmsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetKmsConfigRequest(); + 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 GetKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetKmsConfigRequest.verify = function verify(message) { + if (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 GetKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest + */ + GetKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetKmsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.GetKmsConfigRequest} message GetKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetKmsConfigRequest.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 GetKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetKmsConfigRequest"; + }; + + return GetKmsConfigRequest; + })(); + + v1.ListKmsConfigsRequest = (function() { + + /** + * Properties of a ListKmsConfigsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListKmsConfigsRequest + * @property {string|null} [parent] ListKmsConfigsRequest parent + * @property {number|null} [pageSize] ListKmsConfigsRequest pageSize + * @property {string|null} [pageToken] ListKmsConfigsRequest pageToken + * @property {string|null} [orderBy] ListKmsConfigsRequest orderBy + * @property {string|null} [filter] ListKmsConfigsRequest filter + */ + + /** + * Constructs a new ListKmsConfigsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListKmsConfigsRequest. + * @implements IListKmsConfigsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest=} [properties] Properties to set + */ + function ListKmsConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListKmsConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.parent = ""; + + /** + * ListKmsConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.pageSize = 0; + + /** + * ListKmsConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.pageToken = ""; + + /** + * ListKmsConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.orderBy = ""; + + /** + * ListKmsConfigsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.filter = ""; + + /** + * Creates a new ListKmsConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest instance + */ + ListKmsConfigsRequest.create = function create(properties) { + return new ListKmsConfigsRequest(properties); + }; + + /** + * Encodes the specified ListKmsConfigsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} message ListKmsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsRequest.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.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListKmsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} message ListKmsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListKmsConfigsRequest(); + 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.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListKmsConfigsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListKmsConfigsRequest.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.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListKmsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest + */ + ListKmsConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListKmsConfigsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListKmsConfigsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListKmsConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.ListKmsConfigsRequest} message ListKmsConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListKmsConfigsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListKmsConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListKmsConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListKmsConfigsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListKmsConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListKmsConfigsRequest"; + }; + + return ListKmsConfigsRequest; + })(); + + v1.ListKmsConfigsResponse = (function() { + + /** + * Properties of a ListKmsConfigsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListKmsConfigsResponse + * @property {Array.|null} [kmsConfigs] ListKmsConfigsResponse kmsConfigs + * @property {string|null} [nextPageToken] ListKmsConfigsResponse nextPageToken + * @property {Array.|null} [unreachable] ListKmsConfigsResponse unreachable + */ + + /** + * Constructs a new ListKmsConfigsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListKmsConfigsResponse. + * @implements IListKmsConfigsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse=} [properties] Properties to set + */ + function ListKmsConfigsResponse(properties) { + this.kmsConfigs = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListKmsConfigsResponse kmsConfigs. + * @member {Array.} kmsConfigs + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + */ + ListKmsConfigsResponse.prototype.kmsConfigs = $util.emptyArray; + + /** + * ListKmsConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + */ + ListKmsConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListKmsConfigsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + */ + ListKmsConfigsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListKmsConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse instance + */ + ListKmsConfigsResponse.create = function create(properties) { + return new ListKmsConfigsResponse(properties); + }; + + /** + * Encodes the specified ListKmsConfigsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse} message ListKmsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsConfigs != null && message.kmsConfigs.length) + for (var i = 0; i < message.kmsConfigs.length; ++i) + $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListKmsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse} message ListKmsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListKmsConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.kmsConfigs && message.kmsConfigs.length)) + message.kmsConfigs = []; + message.kmsConfigs.push($root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListKmsConfigsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListKmsConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsConfigs != null && message.hasOwnProperty("kmsConfigs")) { + if (!Array.isArray(message.kmsConfigs)) + return "kmsConfigs: array expected"; + for (var i = 0; i < message.kmsConfigs.length; ++i) { + var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfigs[i]); + if (error) + return "kmsConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListKmsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse + */ + ListKmsConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListKmsConfigsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListKmsConfigsResponse(); + if (object.kmsConfigs) { + if (!Array.isArray(object.kmsConfigs)) + throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.kmsConfigs: array expected"); + message.kmsConfigs = []; + for (var i = 0; i < object.kmsConfigs.length; ++i) { + if (typeof object.kmsConfigs[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.kmsConfigs: object expected"); + message.kmsConfigs[i] = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListKmsConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.ListKmsConfigsResponse} message ListKmsConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListKmsConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.kmsConfigs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.kmsConfigs && message.kmsConfigs.length) { + object.kmsConfigs = []; + for (var j = 0; j < message.kmsConfigs.length; ++j) + object.kmsConfigs[j] = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListKmsConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListKmsConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListKmsConfigsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListKmsConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListKmsConfigsResponse"; + }; + + return ListKmsConfigsResponse; + })(); + + v1.CreateKmsConfigRequest = (function() { + + /** + * Properties of a CreateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateKmsConfigRequest + * @property {string|null} [parent] CreateKmsConfigRequest parent + * @property {string|null} [kmsConfigId] CreateKmsConfigRequest kmsConfigId + * @property {google.cloud.netapp.v1.IKmsConfig|null} [kmsConfig] CreateKmsConfigRequest kmsConfig + */ + + /** + * Constructs a new CreateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateKmsConfigRequest. + * @implements ICreateKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest=} [properties] Properties to set + */ + function CreateKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateKmsConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + */ + CreateKmsConfigRequest.prototype.parent = ""; + + /** + * CreateKmsConfigRequest kmsConfigId. + * @member {string} kmsConfigId + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + */ + CreateKmsConfigRequest.prototype.kmsConfigId = ""; + + /** + * CreateKmsConfigRequest kmsConfig. + * @member {google.cloud.netapp.v1.IKmsConfig|null|undefined} kmsConfig + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + */ + CreateKmsConfigRequest.prototype.kmsConfig = null; + + /** + * Creates a new CreateKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest instance + */ + CreateKmsConfigRequest.create = function create(properties) { + return new CreateKmsConfigRequest(properties); + }; + + /** + * Encodes the specified CreateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} message CreateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateKmsConfigRequest.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.kmsConfigId != null && Object.hasOwnProperty.call(message, "kmsConfigId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsConfigId); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} message CreateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateKmsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateKmsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.kmsConfigId = reader.string(); + break; + } + case 3: { + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateKmsConfigRequest.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.kmsConfigId != null && message.hasOwnProperty("kmsConfigId")) + if (!$util.isString(message.kmsConfigId)) + return "kmsConfigId: string expected"; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) { + var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfig); + if (error) + return "kmsConfig." + error; + } + return null; + }; + + /** + * Creates a CreateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest + */ + CreateKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateKmsConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.kmsConfigId != null) + message.kmsConfigId = String(object.kmsConfigId); + if (object.kmsConfig != null) { + if (typeof object.kmsConfig !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateKmsConfigRequest.kmsConfig: object expected"); + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfig); + } + return message; + }; + + /** + * Creates a plain object from a CreateKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.CreateKmsConfigRequest} message CreateKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateKmsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.kmsConfigId = ""; + object.kmsConfig = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.kmsConfigId != null && message.hasOwnProperty("kmsConfigId")) + object.kmsConfigId = message.kmsConfigId; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfig, options); + return object; + }; + + /** + * Converts this CreateKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateKmsConfigRequest"; + }; + + return CreateKmsConfigRequest; + })(); + + v1.UpdateKmsConfigRequest = (function() { + + /** + * Properties of an UpdateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateKmsConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateKmsConfigRequest updateMask + * @property {google.cloud.netapp.v1.IKmsConfig|null} [kmsConfig] UpdateKmsConfigRequest kmsConfig + */ + + /** + * Constructs a new UpdateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateKmsConfigRequest. + * @implements IUpdateKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest=} [properties] Properties to set + */ + function UpdateKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateKmsConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @instance + */ + UpdateKmsConfigRequest.prototype.updateMask = null; + + /** + * UpdateKmsConfigRequest kmsConfig. + * @member {google.cloud.netapp.v1.IKmsConfig|null|undefined} kmsConfig + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @instance + */ + UpdateKmsConfigRequest.prototype.kmsConfig = null; + + /** + * Creates a new UpdateKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest instance + */ + UpdateKmsConfigRequest.create = function create(properties) { + return new UpdateKmsConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} message UpdateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateKmsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} message UpdateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateKmsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateKmsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateKmsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) { + var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfig); + if (error) + return "kmsConfig." + error; + } + return null; + }; + + /** + * Creates an UpdateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest + */ + UpdateKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateKmsConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateKmsConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.kmsConfig != null) { + if (typeof object.kmsConfig !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateKmsConfigRequest.kmsConfig: object expected"); + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfig); + } + return message; + }; + + /** + * Creates a plain object from an UpdateKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.UpdateKmsConfigRequest} message UpdateKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateKmsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.kmsConfig = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfig, options); + return object; + }; + + /** + * Converts this UpdateKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateKmsConfigRequest"; + }; + + return UpdateKmsConfigRequest; + })(); + + v1.DeleteKmsConfigRequest = (function() { + + /** + * Properties of a DeleteKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteKmsConfigRequest + * @property {string|null} [name] DeleteKmsConfigRequest name + */ + + /** + * Constructs a new DeleteKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteKmsConfigRequest. + * @implements IDeleteKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest=} [properties] Properties to set + */ + function DeleteKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteKmsConfigRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @instance + */ + DeleteKmsConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest instance + */ + DeleteKmsConfigRequest.create = function create(properties) { + return new DeleteKmsConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} message DeleteKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteKmsConfigRequest.encode = function encode(message, writer) { + 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 DeleteKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} message DeleteKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteKmsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteKmsConfigRequest(); + 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 DeleteKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteKmsConfigRequest.verify = function verify(message) { + if (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 DeleteKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest + */ + DeleteKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteKmsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.DeleteKmsConfigRequest} message DeleteKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteKmsConfigRequest.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 DeleteKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteKmsConfigRequest"; + }; + + return DeleteKmsConfigRequest; + })(); + + v1.EncryptVolumesRequest = (function() { + + /** + * Properties of an EncryptVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IEncryptVolumesRequest + * @property {string|null} [name] EncryptVolumesRequest name + */ + + /** + * Constructs a new EncryptVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an EncryptVolumesRequest. + * @implements IEncryptVolumesRequest + * @constructor + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest=} [properties] Properties to set + */ + function EncryptVolumesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptVolumesRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @instance + */ + EncryptVolumesRequest.prototype.name = ""; + + /** + * Creates a new EncryptVolumesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest instance + */ + EncryptVolumesRequest.create = function create(properties) { + return new EncryptVolumesRequest(properties); + }; + + /** + * Encodes the specified EncryptVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} message EncryptVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptVolumesRequest.encode = function encode(message, writer) { + 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 EncryptVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} message EncryptVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptVolumesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptVolumesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EncryptVolumesRequest(); + 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 an EncryptVolumesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptVolumesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptVolumesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptVolumesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an EncryptVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest + */ + EncryptVolumesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.EncryptVolumesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.EncryptVolumesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an EncryptVolumesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.EncryptVolumesRequest} message EncryptVolumesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptVolumesRequest.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 EncryptVolumesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @instance + * @returns {Object.} JSON object + */ + EncryptVolumesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptVolumesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.EncryptVolumesRequest"; + }; + + return EncryptVolumesRequest; + })(); + + v1.VerifyKmsConfigRequest = (function() { + + /** + * Properties of a VerifyKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IVerifyKmsConfigRequest + * @property {string|null} [name] VerifyKmsConfigRequest name + */ + + /** + * Constructs a new VerifyKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a VerifyKmsConfigRequest. + * @implements IVerifyKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest=} [properties] Properties to set + */ + function VerifyKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerifyKmsConfigRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @instance + */ + VerifyKmsConfigRequest.prototype.name = ""; + + /** + * Creates a new VerifyKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest instance + */ + VerifyKmsConfigRequest.create = function create(properties) { + return new VerifyKmsConfigRequest(properties); + }; + + /** + * Encodes the specified VerifyKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} message VerifyKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigRequest.encode = function encode(message, writer) { + 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 VerifyKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} message VerifyKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.VerifyKmsConfigRequest(); + 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 VerifyKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyKmsConfigRequest.verify = function verify(message) { + if (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 VerifyKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest + */ + VerifyKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.VerifyKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.VerifyKmsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a VerifyKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.VerifyKmsConfigRequest} message VerifyKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyKmsConfigRequest.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 VerifyKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.VerifyKmsConfigRequest"; + }; + + return VerifyKmsConfigRequest; + })(); + + v1.VerifyKmsConfigResponse = (function() { + + /** + * Properties of a VerifyKmsConfigResponse. + * @memberof google.cloud.netapp.v1 + * @interface IVerifyKmsConfigResponse + * @property {boolean|null} [healthy] VerifyKmsConfigResponse healthy + * @property {string|null} [healthError] VerifyKmsConfigResponse healthError + * @property {string|null} [instructions] VerifyKmsConfigResponse instructions + */ + + /** + * Constructs a new VerifyKmsConfigResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a VerifyKmsConfigResponse. + * @implements IVerifyKmsConfigResponse + * @constructor + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse=} [properties] Properties to set + */ + function VerifyKmsConfigResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerifyKmsConfigResponse healthy. + * @member {boolean} healthy + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + */ + VerifyKmsConfigResponse.prototype.healthy = false; + + /** + * VerifyKmsConfigResponse healthError. + * @member {string} healthError + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + */ + VerifyKmsConfigResponse.prototype.healthError = ""; + + /** + * VerifyKmsConfigResponse instructions. + * @member {string} instructions + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + */ + VerifyKmsConfigResponse.prototype.instructions = ""; + + /** + * Creates a new VerifyKmsConfigResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse instance + */ + VerifyKmsConfigResponse.create = function create(properties) { + return new VerifyKmsConfigResponse(properties); + }; + + /** + * Encodes the specified VerifyKmsConfigResponse message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse} message VerifyKmsConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.healthy); + if (message.healthError != null && Object.hasOwnProperty.call(message, "healthError")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthError); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.instructions); + return writer; + }; + + /** + * Encodes the specified VerifyKmsConfigResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse} message VerifyKmsConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.VerifyKmsConfigResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.healthy = reader.bool(); + break; + } + case 2: { + message.healthError = reader.string(); + break; + } + case 3: { + message.instructions = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyKmsConfigResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyKmsConfigResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.healthy != null && message.hasOwnProperty("healthy")) + if (typeof message.healthy !== "boolean") + return "healthy: boolean expected"; + if (message.healthError != null && message.hasOwnProperty("healthError")) + if (!$util.isString(message.healthError)) + return "healthError: string expected"; + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + return null; + }; + + /** + * Creates a VerifyKmsConfigResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse + */ + VerifyKmsConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.VerifyKmsConfigResponse) + return object; + var message = new $root.google.cloud.netapp.v1.VerifyKmsConfigResponse(); + if (object.healthy != null) + message.healthy = Boolean(object.healthy); + if (object.healthError != null) + message.healthError = String(object.healthError); + if (object.instructions != null) + message.instructions = String(object.instructions); + return message; + }; + + /** + * Creates a plain object from a VerifyKmsConfigResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.VerifyKmsConfigResponse} message VerifyKmsConfigResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyKmsConfigResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.healthy = false; + object.healthError = ""; + object.instructions = ""; + } + if (message.healthy != null && message.hasOwnProperty("healthy")) + object.healthy = message.healthy; + if (message.healthError != null && message.hasOwnProperty("healthError")) + object.healthError = message.healthError; + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + return object; + }; + + /** + * Converts this VerifyKmsConfigResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + * @returns {Object.} JSON object + */ + VerifyKmsConfigResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyKmsConfigResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyKmsConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.VerifyKmsConfigResponse"; + }; + + return VerifyKmsConfigResponse; + })(); + + v1.KmsConfig = (function() { + + /** + * Properties of a KmsConfig. + * @memberof google.cloud.netapp.v1 + * @interface IKmsConfig + * @property {string|null} [name] KmsConfig name + * @property {string|null} [cryptoKeyName] KmsConfig cryptoKeyName + * @property {google.cloud.netapp.v1.KmsConfig.State|null} [state] KmsConfig state + * @property {string|null} [stateDetails] KmsConfig stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] KmsConfig createTime + * @property {string|null} [description] KmsConfig description + * @property {Object.|null} [labels] KmsConfig labels + * @property {string|null} [instructions] KmsConfig instructions + * @property {string|null} [serviceAccount] KmsConfig serviceAccount + */ + + /** + * Constructs a new KmsConfig. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a KmsConfig. + * @implements IKmsConfig + * @constructor + * @param {google.cloud.netapp.v1.IKmsConfig=} [properties] Properties to set + */ + function KmsConfig(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]]; + } + + /** + * KmsConfig name. + * @member {string} name + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.name = ""; + + /** + * KmsConfig cryptoKeyName. + * @member {string} cryptoKeyName + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.cryptoKeyName = ""; + + /** + * KmsConfig state. + * @member {google.cloud.netapp.v1.KmsConfig.State} state + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.state = 0; + + /** + * KmsConfig stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.stateDetails = ""; + + /** + * KmsConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.createTime = null; + + /** + * KmsConfig description. + * @member {string} description + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.description = ""; + + /** + * KmsConfig labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.labels = $util.emptyObject; + + /** + * KmsConfig instructions. + * @member {string} instructions + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.instructions = ""; + + /** + * KmsConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.serviceAccount = ""; + + /** + * Creates a new KmsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.IKmsConfig=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig instance + */ + KmsConfig.create = function create(properties) { + return new KmsConfig(properties); + }; + + /** + * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.IKmsConfig} message KmsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KmsConfig.encode = function encode(message, writer) { + 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.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cryptoKeyName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stateDetails); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.instructions); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + return writer; + }; + + /** + * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.IKmsConfig} message KmsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KmsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KmsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KmsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.KmsConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.cryptoKeyName = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.stateDetails = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.instructions = reader.string(); + break; + } + case 9: { + message.serviceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KmsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KmsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KmsConfig message. + * @function verify + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KmsConfig.verify = function verify(message) { + if (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.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + if (!$util.isString(message.cryptoKeyName)) + return "cryptoKeyName: 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: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: 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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + return null; + }; + + /** + * Creates a KmsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig + */ + KmsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.KmsConfig) + return object; + var message = new $root.google.cloud.netapp.v1.KmsConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.cryptoKeyName != null) + message.cryptoKeyName = String(object.cryptoKeyName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "IN_USE": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + case "KEY_CHECK_PENDING": + case 7: + message.state = 7; + break; + case "KEY_NOT_REACHABLE": + case 8: + message.state = 8; + break; + case "DISABLING": + case 9: + message.state = 9; + break; + case "DISABLED": + case 10: + message.state = 10; + break; + case "MIGRATING": + case 11: + message.state = 11; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.KmsConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.KmsConfig.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.instructions != null) + message.instructions = String(object.instructions); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + return message; + }; + + /** + * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.KmsConfig} message KmsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KmsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.cryptoKeyName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.description = ""; + object.instructions = ""; + object.serviceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + object.cryptoKeyName = message.cryptoKeyName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.KmsConfig.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.KmsConfig.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + return object; + }; + + /** + * Converts this KmsConfig to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + * @returns {Object.} JSON object + */ + KmsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KmsConfig + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KmsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.KmsConfig"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.KmsConfig.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} IN_USE=5 IN_USE value + * @property {number} ERROR=6 ERROR value + * @property {number} KEY_CHECK_PENDING=7 KEY_CHECK_PENDING value + * @property {number} KEY_NOT_REACHABLE=8 KEY_NOT_REACHABLE value + * @property {number} DISABLING=9 DISABLING value + * @property {number} DISABLED=10 DISABLED value + * @property {number} MIGRATING=11 MIGRATING value + */ + KmsConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "IN_USE"] = 5; + values[valuesById[6] = "ERROR"] = 6; + values[valuesById[7] = "KEY_CHECK_PENDING"] = 7; + values[valuesById[8] = "KEY_NOT_REACHABLE"] = 8; + values[valuesById[9] = "DISABLING"] = 9; + values[valuesById[10] = "DISABLED"] = 10; + values[valuesById[11] = "MIGRATING"] = 11; + return values; + })(); + + return KmsConfig; + })(); + + v1.TransferStats = (function() { + + /** + * Properties of a TransferStats. + * @memberof google.cloud.netapp.v1 + * @interface ITransferStats + * @property {number|Long|null} [transferBytes] TransferStats transferBytes + * @property {google.protobuf.IDuration|null} [totalTransferDuration] TransferStats totalTransferDuration + * @property {number|Long|null} [lastTransferBytes] TransferStats lastTransferBytes + * @property {google.protobuf.IDuration|null} [lastTransferDuration] TransferStats lastTransferDuration + * @property {google.protobuf.IDuration|null} [lagDuration] TransferStats lagDuration + * @property {google.protobuf.ITimestamp|null} [updateTime] TransferStats updateTime + * @property {google.protobuf.ITimestamp|null} [lastTransferEndTime] TransferStats lastTransferEndTime + * @property {string|null} [lastTransferError] TransferStats lastTransferError + */ + + /** + * Constructs a new TransferStats. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a TransferStats. + * @implements ITransferStats + * @constructor + * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set + */ + function TransferStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransferStats transferBytes. + * @member {number|Long|null|undefined} transferBytes + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.transferBytes = null; + + /** + * TransferStats totalTransferDuration. + * @member {google.protobuf.IDuration|null|undefined} totalTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.totalTransferDuration = null; + + /** + * TransferStats lastTransferBytes. + * @member {number|Long|null|undefined} lastTransferBytes + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferBytes = null; + + /** + * TransferStats lastTransferDuration. + * @member {google.protobuf.IDuration|null|undefined} lastTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferDuration = null; + + /** + * TransferStats lagDuration. + * @member {google.protobuf.IDuration|null|undefined} lagDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lagDuration = null; + + /** + * TransferStats updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.updateTime = null; + + /** + * TransferStats lastTransferEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastTransferEndTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferEndTime = null; + + /** + * TransferStats lastTransferError. + * @member {string|null|undefined} lastTransferError + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferError = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransferStats _transferBytes. + * @member {"transferBytes"|undefined} _transferBytes + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_transferBytes", { + get: $util.oneOfGetter($oneOfFields = ["transferBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransferStats _totalTransferDuration. + * @member {"totalTransferDuration"|undefined} _totalTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_totalTransferDuration", { + get: $util.oneOfGetter($oneOfFields = ["totalTransferDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransferStats _lastTransferBytes. + * @member {"lastTransferBytes"|undefined} _lastTransferBytes + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_lastTransferBytes", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransferStats _lastTransferDuration. + * @member {"lastTransferDuration"|undefined} _lastTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_lastTransferDuration", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransferStats _lagDuration. + * @member {"lagDuration"|undefined} _lagDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_lagDuration", { + get: $util.oneOfGetter($oneOfFields = ["lagDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransferStats _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransferStats _lastTransferEndTime. + * @member {"lastTransferEndTime"|undefined} _lastTransferEndTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_lastTransferEndTime", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransferStats _lastTransferError. + * @member {"lastTransferError"|undefined} _lastTransferError + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + Object.defineProperty(TransferStats.prototype, "_lastTransferError", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferError"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransferStats instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats instance + */ + TransferStats.create = function create(properties) { + return new TransferStats(properties); + }; + + /** + * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transferBytes != null && Object.hasOwnProperty.call(message, "transferBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transferBytes); + if (message.totalTransferDuration != null && Object.hasOwnProperty.call(message, "totalTransferDuration")) + $root.google.protobuf.Duration.encode(message.totalTransferDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastTransferBytes != null && Object.hasOwnProperty.call(message, "lastTransferBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lastTransferBytes); + if (message.lastTransferDuration != null && Object.hasOwnProperty.call(message, "lastTransferDuration")) + $root.google.protobuf.Duration.encode(message.lastTransferDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lagDuration != null && Object.hasOwnProperty.call(message, "lagDuration")) + $root.google.protobuf.Duration.encode(message.lagDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastTransferEndTime != null && Object.hasOwnProperty.call(message, "lastTransferEndTime")) + $root.google.protobuf.Timestamp.encode(message.lastTransferEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastTransferError != null && Object.hasOwnProperty.call(message, "lastTransferError")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastTransferError); + return writer; + }; + + /** + * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.TransferStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.transferBytes = reader.int64(); + break; + } + case 2: { + message.totalTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastTransferBytes = reader.int64(); + break; + } + case 4: { + message.lastTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lagDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastTransferEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastTransferError = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransferStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferStats message. + * @function verify + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { + properties._transferBytes = 1; + if (!$util.isInteger(message.transferBytes) && !(message.transferBytes && $util.isInteger(message.transferBytes.low) && $util.isInteger(message.transferBytes.high))) + return "transferBytes: integer|Long expected"; + } + if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { + properties._totalTransferDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.totalTransferDuration); + if (error) + return "totalTransferDuration." + error; + } + } + if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { + properties._lastTransferBytes = 1; + if (!$util.isInteger(message.lastTransferBytes) && !(message.lastTransferBytes && $util.isInteger(message.lastTransferBytes.low) && $util.isInteger(message.lastTransferBytes.high))) + return "lastTransferBytes: integer|Long expected"; + } + if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { + properties._lastTransferDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.lastTransferDuration); + if (error) + return "lastTransferDuration." + error; + } + } + if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { + properties._lagDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.lagDuration); + if (error) + return "lagDuration." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { + properties._lastTransferEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.lastTransferEndTime); + if (error) + return "lastTransferEndTime." + error; + } + } + if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { + properties._lastTransferError = 1; + if (!$util.isString(message.lastTransferError)) + return "lastTransferError: string expected"; + } + return null; + }; + + /** + * Creates a TransferStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + */ + TransferStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.TransferStats) + return object; + var message = new $root.google.cloud.netapp.v1.TransferStats(); + if (object.transferBytes != null) + if ($util.Long) + (message.transferBytes = $util.Long.fromValue(object.transferBytes)).unsigned = false; + else if (typeof object.transferBytes === "string") + message.transferBytes = parseInt(object.transferBytes, 10); + else if (typeof object.transferBytes === "number") + message.transferBytes = object.transferBytes; + else if (typeof object.transferBytes === "object") + message.transferBytes = new $util.LongBits(object.transferBytes.low >>> 0, object.transferBytes.high >>> 0).toNumber(); + if (object.totalTransferDuration != null) { + if (typeof object.totalTransferDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.totalTransferDuration: object expected"); + message.totalTransferDuration = $root.google.protobuf.Duration.fromObject(object.totalTransferDuration); + } + if (object.lastTransferBytes != null) + if ($util.Long) + (message.lastTransferBytes = $util.Long.fromValue(object.lastTransferBytes)).unsigned = false; + else if (typeof object.lastTransferBytes === "string") + message.lastTransferBytes = parseInt(object.lastTransferBytes, 10); + else if (typeof object.lastTransferBytes === "number") + message.lastTransferBytes = object.lastTransferBytes; + else if (typeof object.lastTransferBytes === "object") + message.lastTransferBytes = new $util.LongBits(object.lastTransferBytes.low >>> 0, object.lastTransferBytes.high >>> 0).toNumber(); + if (object.lastTransferDuration != null) { + if (typeof object.lastTransferDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferDuration: object expected"); + message.lastTransferDuration = $root.google.protobuf.Duration.fromObject(object.lastTransferDuration); + } + if (object.lagDuration != null) { + if (typeof object.lagDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lagDuration: object expected"); + message.lagDuration = $root.google.protobuf.Duration.fromObject(object.lagDuration); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastTransferEndTime != null) { + if (typeof object.lastTransferEndTime !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferEndTime: object expected"); + message.lastTransferEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastTransferEndTime); + } + if (object.lastTransferError != null) + message.lastTransferError = String(object.lastTransferError); + return message; + }; + + /** + * Creates a plain object from a TransferStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.TransferStats} message TransferStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { + if (typeof message.transferBytes === "number") + object.transferBytes = options.longs === String ? String(message.transferBytes) : message.transferBytes; + else + object.transferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transferBytes) : options.longs === Number ? new $util.LongBits(message.transferBytes.low >>> 0, message.transferBytes.high >>> 0).toNumber() : message.transferBytes; + if (options.oneofs) + object._transferBytes = "transferBytes"; + } + if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { + object.totalTransferDuration = $root.google.protobuf.Duration.toObject(message.totalTransferDuration, options); + if (options.oneofs) + object._totalTransferDuration = "totalTransferDuration"; + } + if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { + if (typeof message.lastTransferBytes === "number") + object.lastTransferBytes = options.longs === String ? String(message.lastTransferBytes) : message.lastTransferBytes; + else + object.lastTransferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.lastTransferBytes) : options.longs === Number ? new $util.LongBits(message.lastTransferBytes.low >>> 0, message.lastTransferBytes.high >>> 0).toNumber() : message.lastTransferBytes; + if (options.oneofs) + object._lastTransferBytes = "lastTransferBytes"; + } + if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { + object.lastTransferDuration = $root.google.protobuf.Duration.toObject(message.lastTransferDuration, options); + if (options.oneofs) + object._lastTransferDuration = "lastTransferDuration"; + } + if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { + object.lagDuration = $root.google.protobuf.Duration.toObject(message.lagDuration, options); + if (options.oneofs) + object._lagDuration = "lagDuration"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { + object.lastTransferEndTime = $root.google.protobuf.Timestamp.toObject(message.lastTransferEndTime, options); + if (options.oneofs) + object._lastTransferEndTime = "lastTransferEndTime"; + } + if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { + object.lastTransferError = message.lastTransferError; + if (options.oneofs) + object._lastTransferError = "lastTransferError"; + } + return object; + }; + + /** + * Converts this TransferStats to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + * @returns {Object.} JSON object + */ + TransferStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransferStats + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransferStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.TransferStats"; + }; + + return TransferStats; + })(); + + v1.Replication = (function() { + + /** + * Properties of a Replication. + * @memberof google.cloud.netapp.v1 + * @interface IReplication + * @property {string|null} [name] Replication name + * @property {google.cloud.netapp.v1.Replication.State|null} [state] Replication state + * @property {string|null} [stateDetails] Replication stateDetails + * @property {google.cloud.netapp.v1.Replication.ReplicationRole|null} [role] Replication role + * @property {google.cloud.netapp.v1.Replication.ReplicationSchedule|null} [replicationSchedule] Replication replicationSchedule + * @property {google.cloud.netapp.v1.Replication.MirrorState|null} [mirrorState] Replication mirrorState + * @property {boolean|null} [healthy] Replication healthy + * @property {google.protobuf.ITimestamp|null} [createTime] Replication createTime + * @property {string|null} [destinationVolume] Replication destinationVolume + * @property {google.cloud.netapp.v1.ITransferStats|null} [transferStats] Replication transferStats + * @property {Object.|null} [labels] Replication labels + * @property {string|null} [description] Replication description + * @property {google.cloud.netapp.v1.IDestinationVolumeParameters|null} [destinationVolumeParameters] Replication destinationVolumeParameters + * @property {string|null} [sourceVolume] Replication sourceVolume + */ + + /** + * Constructs a new Replication. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Replication. + * @implements IReplication + * @constructor + * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set + */ + function Replication(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]]; + } + + /** + * Replication name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.name = ""; + + /** + * Replication state. + * @member {google.cloud.netapp.v1.Replication.State} state + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.state = 0; + + /** + * Replication stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.stateDetails = ""; + + /** + * Replication role. + * @member {google.cloud.netapp.v1.Replication.ReplicationRole} role + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.role = 0; + + /** + * Replication replicationSchedule. + * @member {google.cloud.netapp.v1.Replication.ReplicationSchedule} replicationSchedule + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.replicationSchedule = 0; + + /** + * Replication mirrorState. + * @member {google.cloud.netapp.v1.Replication.MirrorState} mirrorState + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.mirrorState = 0; + + /** + * Replication healthy. + * @member {boolean|null|undefined} healthy + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.healthy = null; + + /** + * Replication createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.createTime = null; + + /** + * Replication destinationVolume. + * @member {string} destinationVolume + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.destinationVolume = ""; + + /** + * Replication transferStats. + * @member {google.cloud.netapp.v1.ITransferStats|null|undefined} transferStats + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.transferStats = null; + + /** + * Replication labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.labels = $util.emptyObject; + + /** + * Replication description. + * @member {string|null|undefined} description + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.description = null; + + /** + * Replication destinationVolumeParameters. + * @member {google.cloud.netapp.v1.IDestinationVolumeParameters|null|undefined} destinationVolumeParameters + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.destinationVolumeParameters = null; + + /** + * Replication sourceVolume. + * @member {string} sourceVolume + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.sourceVolume = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Replication _healthy. + * @member {"healthy"|undefined} _healthy + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Object.defineProperty(Replication.prototype, "_healthy", { + get: $util.oneOfGetter($oneOfFields = ["healthy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Replication _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Object.defineProperty(Replication.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Replication instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Replication} Replication instance + */ + Replication.create = function create(properties) { + return new Replication(properties); + }; + + /** + * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Replication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.role); + if (message.replicationSchedule != null && Object.hasOwnProperty.call(message, "replicationSchedule")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.replicationSchedule); + if (message.mirrorState != null && Object.hasOwnProperty.call(message, "mirrorState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mirrorState); + if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.healthy); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.destinationVolume != null && Object.hasOwnProperty.call(message, "destinationVolume")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.destinationVolume); + if (message.transferStats != null && Object.hasOwnProperty.call(message, "transferStats")) + $root.google.cloud.netapp.v1.TransferStats.encode(message.transferStats, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); + if (message.destinationVolumeParameters != null && Object.hasOwnProperty.call(message, "destinationVolumeParameters")) + $root.google.cloud.netapp.v1.DestinationVolumeParameters.encode(message.destinationVolumeParameters, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.sourceVolume); + return writer; + }; + + /** + * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Replication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Replication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Replication} Replication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Replication.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Replication(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.role = reader.int32(); + break; + } + case 5: { + message.replicationSchedule = reader.int32(); + break; + } + case 6: { + message.mirrorState = reader.int32(); + break; + } + case 8: { + message.healthy = reader.bool(); + break; + } + case 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.destinationVolume = reader.string(); + break; + } + case 11: { + message.transferStats = $root.google.cloud.netapp.v1.TransferStats.decode(reader, reader.uint32()); + break; + } + case 12: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 13: { + message.description = reader.string(); + break; + } + case 14: { + message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.decode(reader, reader.uint32()); + break; + } + case 15: { + message.sourceVolume = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Replication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Replication} Replication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Replication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Replication message. + * @function verify + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Replication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 6: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.role != null && message.hasOwnProperty("role")) + switch (message.role) { + default: + return "role: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + switch (message.replicationSchedule) { + default: + return "replicationSchedule: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) + switch (message.mirrorState) { + default: + return "mirrorState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.healthy != null && message.hasOwnProperty("healthy")) { + properties._healthy = 1; + if (typeof message.healthy !== "boolean") + return "healthy: boolean expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) + if (!$util.isString(message.destinationVolume)) + return "destinationVolume: string expected"; + if (message.transferStats != null && message.hasOwnProperty("transferStats")) { + var error = $root.google.cloud.netapp.v1.TransferStats.verify(message.transferStats); + if (error) + return "transferStats." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) { + var error = $root.google.cloud.netapp.v1.DestinationVolumeParameters.verify(message.destinationVolumeParameters); + if (error) + return "destinationVolumeParameters." + error; + } + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + if (!$util.isString(message.sourceVolume)) + return "sourceVolume: string expected"; + return null; + }; + + /** + * Creates a Replication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Replication} Replication + */ + Replication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Replication) + return object; + var message = new $root.google.cloud.netapp.v1.Replication(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + switch (object.role) { + default: + if (typeof object.role === "number") { + message.role = object.role; + break; + } + break; + case "REPLICATION_ROLE_UNSPECIFIED": + case 0: + message.role = 0; + break; + case "SOURCE": + case 1: + message.role = 1; + break; + case "DESTINATION": + case 2: + message.role = 2; + break; + } + switch (object.replicationSchedule) { + default: + if (typeof object.replicationSchedule === "number") { + message.replicationSchedule = object.replicationSchedule; + break; + } + break; + case "REPLICATION_SCHEDULE_UNSPECIFIED": + case 0: + message.replicationSchedule = 0; + break; + case "EVERY_10_MINUTES": + case 1: + message.replicationSchedule = 1; + break; + case "HOURLY": + case 2: + message.replicationSchedule = 2; + break; + case "DAILY": + case 3: + message.replicationSchedule = 3; + break; + } + switch (object.mirrorState) { + default: + if (typeof object.mirrorState === "number") { + message.mirrorState = object.mirrorState; + break; + } + break; + case "MIRROR_STATE_UNSPECIFIED": + case 0: + message.mirrorState = 0; + break; + case "PREPARING": + case 1: + message.mirrorState = 1; + break; + case "MIRRORED": + case 2: + message.mirrorState = 2; + break; + case "STOPPED": + case 3: + message.mirrorState = 3; + break; + case "TRANSFERRING": + case 4: + message.mirrorState = 4; + break; + } + if (object.healthy != null) + message.healthy = Boolean(object.healthy); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.destinationVolume != null) + message.destinationVolume = String(object.destinationVolume); + if (object.transferStats != null) { + if (typeof object.transferStats !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.transferStats: object expected"); + message.transferStats = $root.google.cloud.netapp.v1.TransferStats.fromObject(object.transferStats); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + if (object.destinationVolumeParameters != null) { + if (typeof object.destinationVolumeParameters !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.destinationVolumeParameters: object expected"); + message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.fromObject(object.destinationVolumeParameters); + } + if (object.sourceVolume != null) + message.sourceVolume = String(object.sourceVolume); + return message; + }; + + /** + * Creates a plain object from a Replication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.Replication} message Replication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Replication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.role = options.enums === String ? "REPLICATION_ROLE_UNSPECIFIED" : 0; + object.replicationSchedule = options.enums === String ? "REPLICATION_SCHEDULE_UNSPECIFIED" : 0; + object.mirrorState = options.enums === String ? "MIRROR_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.destinationVolume = ""; + object.transferStats = null; + object.destinationVolumeParameters = null; + object.sourceVolume = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Replication.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Replication.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.role != null && message.hasOwnProperty("role")) + object.role = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] === undefined ? message.role : $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] : message.role; + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + object.replicationSchedule = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] === undefined ? message.replicationSchedule : $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] : message.replicationSchedule; + if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) + object.mirrorState = options.enums === String ? $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] === undefined ? message.mirrorState : $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] : message.mirrorState; + if (message.healthy != null && message.hasOwnProperty("healthy")) { + object.healthy = message.healthy; + if (options.oneofs) + object._healthy = "healthy"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) + object.destinationVolume = message.destinationVolume; + if (message.transferStats != null && message.hasOwnProperty("transferStats")) + object.transferStats = $root.google.cloud.netapp.v1.TransferStats.toObject(message.transferStats, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) + object.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.toObject(message.destinationVolumeParameters, options); + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + object.sourceVolume = message.sourceVolume; + return object; + }; + + /** + * Converts this Replication to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Replication + * @instance + * @returns {Object.} JSON object + */ + Replication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Replication + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Replication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Replication"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.Replication.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=5 DELETING value + * @property {number} ERROR=6 ERROR value + */ + Replication.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + return values; + })(); + + /** + * ReplicationRole enum. + * @name google.cloud.netapp.v1.Replication.ReplicationRole + * @enum {number} + * @property {number} REPLICATION_ROLE_UNSPECIFIED=0 REPLICATION_ROLE_UNSPECIFIED value + * @property {number} SOURCE=1 SOURCE value + * @property {number} DESTINATION=2 DESTINATION value + */ + Replication.ReplicationRole = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPLICATION_ROLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE"] = 1; + values[valuesById[2] = "DESTINATION"] = 2; + return values; + })(); + + /** + * ReplicationSchedule enum. + * @name google.cloud.netapp.v1.Replication.ReplicationSchedule + * @enum {number} + * @property {number} REPLICATION_SCHEDULE_UNSPECIFIED=0 REPLICATION_SCHEDULE_UNSPECIFIED value + * @property {number} EVERY_10_MINUTES=1 EVERY_10_MINUTES value + * @property {number} HOURLY=2 HOURLY value + * @property {number} DAILY=3 DAILY value + */ + Replication.ReplicationSchedule = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPLICATION_SCHEDULE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVERY_10_MINUTES"] = 1; + values[valuesById[2] = "HOURLY"] = 2; + values[valuesById[3] = "DAILY"] = 3; + return values; + })(); + + /** + * MirrorState enum. + * @name google.cloud.netapp.v1.Replication.MirrorState + * @enum {number} + * @property {number} MIRROR_STATE_UNSPECIFIED=0 MIRROR_STATE_UNSPECIFIED value + * @property {number} PREPARING=1 PREPARING value + * @property {number} MIRRORED=2 MIRRORED value + * @property {number} STOPPED=3 STOPPED value + * @property {number} TRANSFERRING=4 TRANSFERRING value + */ + Replication.MirrorState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MIRROR_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREPARING"] = 1; + values[valuesById[2] = "MIRRORED"] = 2; + values[valuesById[3] = "STOPPED"] = 3; + values[valuesById[4] = "TRANSFERRING"] = 4; + return values; + })(); + + return Replication; + })(); + + v1.ListReplicationsRequest = (function() { + + /** + * Properties of a ListReplicationsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListReplicationsRequest + * @property {string|null} [parent] ListReplicationsRequest parent + * @property {number|null} [pageSize] ListReplicationsRequest pageSize + * @property {string|null} [pageToken] ListReplicationsRequest pageToken + * @property {string|null} [orderBy] ListReplicationsRequest orderBy + * @property {string|null} [filter] ListReplicationsRequest filter + */ + + /** + * Constructs a new ListReplicationsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListReplicationsRequest. + * @implements IListReplicationsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set + */ + function ListReplicationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReplicationsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.parent = ""; + + /** + * ListReplicationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.pageSize = 0; + + /** + * ListReplicationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.pageToken = ""; + + /** + * ListReplicationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.orderBy = ""; + + /** + * ListReplicationsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.filter = ""; + + /** + * Creates a new ListReplicationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest instance + */ + ListReplicationsRequest.create = function create(properties) { + return new ListReplicationsRequest(properties); + }; + + /** + * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsRequest.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.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); + 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.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReplicationsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReplicationsRequest.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.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + */ + ListReplicationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.ListReplicationsRequest} message ListReplicationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReplicationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListReplicationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListReplicationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReplicationsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReplicationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsRequest"; + }; + + return ListReplicationsRequest; + })(); + + v1.ListReplicationsResponse = (function() { + + /** + * Properties of a ListReplicationsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListReplicationsResponse + * @property {Array.|null} [replications] ListReplicationsResponse replications + * @property {string|null} [nextPageToken] ListReplicationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListReplicationsResponse unreachable + */ + + /** + * Constructs a new ListReplicationsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListReplicationsResponse. + * @implements IListReplicationsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set + */ + function ListReplicationsResponse(properties) { + this.replications = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReplicationsResponse replications. + * @member {Array.} replications + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + */ + ListReplicationsResponse.prototype.replications = $util.emptyArray; + + /** + * ListReplicationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + */ + ListReplicationsResponse.prototype.nextPageToken = ""; + + /** + * ListReplicationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + */ + ListReplicationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReplicationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse instance + */ + ListReplicationsResponse.create = function create(properties) { + return new ListReplicationsResponse(properties); + }; + + /** + * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.replications != null && message.replications.length) + for (var i = 0; i < message.replications.length; ++i) + $root.google.cloud.netapp.v1.Replication.encode(message.replications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.replications && message.replications.length)) + message.replications = []; + message.replications.push($root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReplicationsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReplicationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.replications != null && message.hasOwnProperty("replications")) { + if (!Array.isArray(message.replications)) + return "replications: array expected"; + for (var i = 0; i < message.replications.length; ++i) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replications[i]); + if (error) + return "replications." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + */ + ListReplicationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); + if (object.replications) { + if (!Array.isArray(object.replications)) + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: array expected"); + message.replications = []; + for (var i = 0; i < object.replications.length; ++i) { + if (typeof object.replications[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: object expected"); + message.replications[i] = $root.google.cloud.netapp.v1.Replication.fromObject(object.replications[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.ListReplicationsResponse} message ListReplicationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReplicationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.replications = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.replications && message.replications.length) { + object.replications = []; + for (var j = 0; j < message.replications.length; ++j) + object.replications[j] = $root.google.cloud.netapp.v1.Replication.toObject(message.replications[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListReplicationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListReplicationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReplicationsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReplicationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsResponse"; + }; + + return ListReplicationsResponse; + })(); + + v1.GetReplicationRequest = (function() { + + /** + * Properties of a GetReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetReplicationRequest + * @property {string|null} [name] GetReplicationRequest name + */ + + /** + * Constructs a new GetReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetReplicationRequest. + * @implements IGetReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set + */ + function GetReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @instance + */ + GetReplicationRequest.prototype.name = ""; + + /** + * Creates a new GetReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest instance + */ + GetReplicationRequest.create = function create(properties) { + return new GetReplicationRequest(properties); + }; + + /** + * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReplicationRequest.encode = function encode(message, writer) { + 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 GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReplicationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); + 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 GetReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReplicationRequest.verify = function verify(message) { + if (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 GetReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + */ + GetReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.GetReplicationRequest} message GetReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReplicationRequest.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 GetReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + GetReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetReplicationRequest"; + }; + + return GetReplicationRequest; + })(); + + v1.DestinationVolumeParameters = (function() { + + /** + * Properties of a DestinationVolumeParameters. + * @memberof google.cloud.netapp.v1 + * @interface IDestinationVolumeParameters + * @property {string|null} [storagePool] DestinationVolumeParameters storagePool + * @property {string|null} [volumeId] DestinationVolumeParameters volumeId + * @property {string|null} [shareName] DestinationVolumeParameters shareName + * @property {string|null} [description] DestinationVolumeParameters description + */ + + /** + * Constructs a new DestinationVolumeParameters. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DestinationVolumeParameters. + * @implements IDestinationVolumeParameters + * @constructor + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set + */ + function DestinationVolumeParameters(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DestinationVolumeParameters storagePool. + * @member {string} storagePool + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.storagePool = ""; + + /** + * DestinationVolumeParameters volumeId. + * @member {string} volumeId + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.volumeId = ""; + + /** + * DestinationVolumeParameters shareName. + * @member {string} shareName + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.shareName = ""; + + /** + * DestinationVolumeParameters description. + * @member {string|null|undefined} description + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.description = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DestinationVolumeParameters _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + Object.defineProperty(DestinationVolumeParameters.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DestinationVolumeParameters instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters instance + */ + DestinationVolumeParameters.create = function create(properties) { + return new DestinationVolumeParameters(properties); + }; + + /** + * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestinationVolumeParameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.storagePool); + if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); + if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shareName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + return writer; + }; + + /** + * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestinationVolumeParameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestinationVolumeParameters.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.storagePool = reader.string(); + break; + } + case 2: { + message.volumeId = reader.string(); + break; + } + case 3: { + message.shareName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestinationVolumeParameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DestinationVolumeParameters message. + * @function verify + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DestinationVolumeParameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + if (!$util.isString(message.storagePool)) + return "storagePool: string expected"; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + if (!$util.isString(message.volumeId)) + return "volumeId: string expected"; + if (message.shareName != null && message.hasOwnProperty("shareName")) + if (!$util.isString(message.shareName)) + return "shareName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + return null; + }; + + /** + * Creates a DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + */ + DestinationVolumeParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DestinationVolumeParameters) + return object; + var message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); + if (object.storagePool != null) + message.storagePool = String(object.storagePool); + if (object.volumeId != null) + message.volumeId = String(object.volumeId); + if (object.shareName != null) + message.shareName = String(object.shareName); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.DestinationVolumeParameters} message DestinationVolumeParameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DestinationVolumeParameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.storagePool = ""; + object.volumeId = ""; + object.shareName = ""; + } + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = message.storagePool; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + object.volumeId = message.volumeId; + if (message.shareName != null && message.hasOwnProperty("shareName")) + object.shareName = message.shareName; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + return object; + }; + + /** + * Converts this DestinationVolumeParameters to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + * @returns {Object.} JSON object + */ + DestinationVolumeParameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DestinationVolumeParameters + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DestinationVolumeParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DestinationVolumeParameters"; + }; + + return DestinationVolumeParameters; + })(); + + v1.CreateReplicationRequest = (function() { + + /** + * Properties of a CreateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateReplicationRequest + * @property {string|null} [parent] CreateReplicationRequest parent + * @property {google.cloud.netapp.v1.IReplication|null} [replication] CreateReplicationRequest replication + * @property {string|null} [replicationId] CreateReplicationRequest replicationId + */ + + /** + * Constructs a new CreateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateReplicationRequest. + * @implements ICreateReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set + */ + function CreateReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateReplicationRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + */ + CreateReplicationRequest.prototype.parent = ""; + + /** + * CreateReplicationRequest replication. + * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + */ + CreateReplicationRequest.prototype.replication = null; + + /** + * CreateReplicationRequest replicationId. + * @member {string} replicationId + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + */ + CreateReplicationRequest.prototype.replicationId = ""; + + /** + * Creates a new CreateReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest instance + */ + CreateReplicationRequest.create = function create(properties) { + return new CreateReplicationRequest(properties); + }; + + /** + * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReplicationRequest.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.replication != null && Object.hasOwnProperty.call(message, "replication")) + $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.replicationId != null && Object.hasOwnProperty.call(message, "replicationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationId); + return writer; + }; + + /** + * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReplicationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); + break; + } + case 3: { + message.replicationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReplicationRequest.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.replication != null && message.hasOwnProperty("replication")) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); + if (error) + return "replication." + error; + } + if (message.replicationId != null && message.hasOwnProperty("replicationId")) + if (!$util.isString(message.replicationId)) + return "replicationId: string expected"; + return null; + }; + + /** + * Creates a CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + */ + CreateReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.replication != null) { + if (typeof object.replication !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateReplicationRequest.replication: object expected"); + message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + } + if (object.replicationId != null) + message.replicationId = String(object.replicationId); + return message; + }; + + /** + * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.CreateReplicationRequest} message CreateReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.replication = null; + object.replicationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.replication != null && message.hasOwnProperty("replication")) + object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); + if (message.replicationId != null && message.hasOwnProperty("replicationId")) + object.replicationId = message.replicationId; + return object; + }; + + /** + * Converts this CreateReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateReplicationRequest"; + }; + + return CreateReplicationRequest; + })(); + + v1.DeleteReplicationRequest = (function() { + + /** + * Properties of a DeleteReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteReplicationRequest + * @property {string|null} [name] DeleteReplicationRequest name + */ + + /** + * Constructs a new DeleteReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteReplicationRequest. + * @implements IDeleteReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set + */ + function DeleteReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @instance + */ + DeleteReplicationRequest.prototype.name = ""; + + /** + * Creates a new DeleteReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest instance + */ + DeleteReplicationRequest.create = function create(properties) { + return new DeleteReplicationRequest(properties); + }; + + /** + * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReplicationRequest.encode = function encode(message, writer) { + 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 DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReplicationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); + 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 DeleteReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteReplicationRequest.verify = function verify(message) { + if (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 DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest + */ + DeleteReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.DeleteReplicationRequest} message DeleteReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteReplicationRequest.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 DeleteReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteReplicationRequest"; + }; + + return DeleteReplicationRequest; + })(); + + v1.UpdateReplicationRequest = (function() { + + /** + * Properties of an UpdateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateReplicationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReplicationRequest updateMask + * @property {google.cloud.netapp.v1.IReplication|null} [replication] UpdateReplicationRequest replication + */ + + /** + * Constructs a new UpdateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateReplicationRequest. + * @implements IUpdateReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set + */ + function UpdateReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateReplicationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @instance + */ + UpdateReplicationRequest.prototype.updateMask = null; + + /** + * UpdateReplicationRequest replication. + * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @instance + */ + UpdateReplicationRequest.prototype.replication = null; + + /** + * Creates a new UpdateReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest instance + */ + UpdateReplicationRequest.create = function create(properties) { + return new UpdateReplicationRequest(properties); + }; + + /** + * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) + $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReplicationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.replication != null && message.hasOwnProperty("replication")) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); + if (error) + return "replication." + error; + } + return null; + }; + + /** + * Creates an UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + */ + UpdateReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.replication != null) { + if (typeof object.replication !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.replication: object expected"); + message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + } + return message; + }; + + /** + * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.UpdateReplicationRequest} message UpdateReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.replication = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.replication != null && message.hasOwnProperty("replication")) + object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); + return object; + }; + + /** + * Converts this UpdateReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateReplicationRequest"; + }; + + return UpdateReplicationRequest; + })(); + + v1.StopReplicationRequest = (function() { + + /** + * Properties of a StopReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IStopReplicationRequest + * @property {string|null} [name] StopReplicationRequest name + * @property {boolean|null} [force] StopReplicationRequest force + */ + + /** + * Constructs a new StopReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a StopReplicationRequest. + * @implements IStopReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set + */ + function StopReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StopReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @instance + */ + StopReplicationRequest.prototype.name = ""; + + /** + * StopReplicationRequest force. + * @member {boolean} force + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @instance + */ + StopReplicationRequest.prototype.force = false; + + /** + * Creates a new StopReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest instance + */ + StopReplicationRequest.create = function create(properties) { + return new StopReplicationRequest(properties); + }; + + /** + * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopReplicationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + */ + StopReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.StopReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.StopReplicationRequest} message StopReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this StopReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + StopReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.StopReplicationRequest"; + }; + + return StopReplicationRequest; + })(); + + v1.ResumeReplicationRequest = (function() { + + /** + * Properties of a ResumeReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IResumeReplicationRequest + * @property {string|null} [name] ResumeReplicationRequest name + */ + + /** + * Constructs a new ResumeReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ResumeReplicationRequest. + * @implements IResumeReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set + */ + function ResumeReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResumeReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @instance + */ + ResumeReplicationRequest.prototype.name = ""; + + /** + * Creates a new ResumeReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest instance + */ + ResumeReplicationRequest.create = function create(properties) { + return new ResumeReplicationRequest(properties); + }; + + /** + * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeReplicationRequest.encode = function encode(message, writer) { + 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 ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResumeReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeReplicationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); + 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 ResumeReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResumeReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResumeReplicationRequest.verify = function verify(message) { + if (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 ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + */ + ResumeReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ResumeReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ResumeReplicationRequest} message ResumeReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResumeReplicationRequest.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 ResumeReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + ResumeReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResumeReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResumeReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ResumeReplicationRequest"; + }; + + return ResumeReplicationRequest; + })(); + + v1.ReverseReplicationDirectionRequest = (function() { + + /** + * Properties of a ReverseReplicationDirectionRequest. + * @memberof google.cloud.netapp.v1 + * @interface IReverseReplicationDirectionRequest + * @property {string|null} [name] ReverseReplicationDirectionRequest name + */ + + /** + * Constructs a new ReverseReplicationDirectionRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ReverseReplicationDirectionRequest. + * @implements IReverseReplicationDirectionRequest + * @constructor + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set + */ + function ReverseReplicationDirectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReverseReplicationDirectionRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @instance + */ + ReverseReplicationDirectionRequest.prototype.name = ""; + + /** + * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest instance + */ + ReverseReplicationDirectionRequest.create = function create(properties) { + return new ReverseReplicationDirectionRequest(properties); + }; + + /** + * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReverseReplicationDirectionRequest.encode = function encode(message, writer) { + 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 ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReverseReplicationDirectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReverseReplicationDirectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); + 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 ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReverseReplicationDirectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReverseReplicationDirectionRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReverseReplicationDirectionRequest.verify = function verify(message) { + if (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 ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + */ + ReverseReplicationDirectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReverseReplicationDirectionRequest.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 ReverseReplicationDirectionRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @instance + * @returns {Object.} JSON object + */ + ReverseReplicationDirectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReverseReplicationDirectionRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReverseReplicationDirectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ReverseReplicationDirectionRequest"; + }; + + return ReverseReplicationDirectionRequest; + })(); + + v1.ListSnapshotsRequest = (function() { + + /** + * Properties of a ListSnapshotsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListSnapshotsRequest + * @property {string|null} [parent] ListSnapshotsRequest parent + * @property {number|null} [pageSize] ListSnapshotsRequest pageSize + * @property {string|null} [pageToken] ListSnapshotsRequest pageToken + * @property {string|null} [orderBy] ListSnapshotsRequest orderBy + * @property {string|null} [filter] ListSnapshotsRequest filter + */ + + /** + * Constructs a new ListSnapshotsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListSnapshotsRequest. + * @implements IListSnapshotsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListSnapshotsRequest=} [properties] Properties to set + */ + function ListSnapshotsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSnapshotsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.parent = ""; + + /** + * ListSnapshotsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.pageSize = 0; + + /** + * ListSnapshotsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.pageToken = ""; + + /** + * ListSnapshotsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.orderBy = ""; + + /** + * ListSnapshotsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.filter = ""; + + /** + * Creates a new ListSnapshotsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest instance + */ + ListSnapshotsRequest.create = function create(properties) { + return new ListSnapshotsRequest(properties); + }; + + /** + * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsRequest.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.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListSnapshotsRequest(); + 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.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSnapshotsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSnapshotsRequest.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.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest + */ + ListSnapshotsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListSnapshotsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListSnapshotsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.ListSnapshotsRequest} message ListSnapshotsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSnapshotsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListSnapshotsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSnapshotsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSnapshotsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSnapshotsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListSnapshotsRequest"; + }; + + return ListSnapshotsRequest; + })(); + + v1.ListSnapshotsResponse = (function() { + + /** + * Properties of a ListSnapshotsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListSnapshotsResponse + * @property {Array.|null} [snapshots] ListSnapshotsResponse snapshots + * @property {string|null} [nextPageToken] ListSnapshotsResponse nextPageToken + * @property {Array.|null} [unreachable] ListSnapshotsResponse unreachable + */ + + /** + * Constructs a new ListSnapshotsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListSnapshotsResponse. + * @implements IListSnapshotsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListSnapshotsResponse=} [properties] Properties to set + */ + function ListSnapshotsResponse(properties) { + this.snapshots = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSnapshotsResponse snapshots. + * @member {Array.} snapshots + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.snapshots = $util.emptyArray; + + /** + * ListSnapshotsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.nextPageToken = ""; + + /** + * ListSnapshotsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListSnapshotsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse instance + */ + ListSnapshotsResponse.create = function create(properties) { + return new ListSnapshotsResponse(properties); + }; + + /** + * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshots != null && message.snapshots.length) + for (var i = 0; i < message.snapshots.length; ++i) + $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListSnapshotsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.snapshots && message.snapshots.length)) + message.snapshots = []; + message.snapshots.push($root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSnapshotsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSnapshotsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshots != null && message.hasOwnProperty("snapshots")) { + if (!Array.isArray(message.snapshots)) + return "snapshots: array expected"; + for (var i = 0; i < message.snapshots.length; ++i) { + var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshots[i]); + if (error) + return "snapshots." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse + */ + ListSnapshotsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListSnapshotsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListSnapshotsResponse(); + if (object.snapshots) { + if (!Array.isArray(object.snapshots)) + throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.snapshots: array expected"); + message.snapshots = []; + for (var i = 0; i < object.snapshots.length; ++i) { + if (typeof object.snapshots[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.snapshots: object expected"); + message.snapshots[i] = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshots[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.ListSnapshotsResponse} message ListSnapshotsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSnapshotsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.snapshots = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.snapshots && message.snapshots.length) { + object.snapshots = []; + for (var j = 0; j < message.snapshots.length; ++j) + object.snapshots[j] = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshots[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListSnapshotsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + * @returns {Object.} JSON object + */ + ListSnapshotsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSnapshotsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSnapshotsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListSnapshotsResponse"; + }; + + return ListSnapshotsResponse; + })(); + + v1.GetSnapshotRequest = (function() { + + /** + * Properties of a GetSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetSnapshotRequest + * @property {string|null} [name] GetSnapshotRequest name + */ + + /** + * Constructs a new GetSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetSnapshotRequest. + * @implements IGetSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetSnapshotRequest=} [properties] Properties to set + */ + function GetSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSnapshotRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @instance + */ + GetSnapshotRequest.prototype.name = ""; + + /** + * Creates a new GetSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IGetSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest instance + */ + GetSnapshotRequest.create = function create(properties) { + return new GetSnapshotRequest(properties); + }; + + /** + * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSnapshotRequest.encode = function encode(message, writer) { + 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 GetSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetSnapshotRequest(); + 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 GetSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSnapshotRequest.verify = function verify(message) { + if (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 GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest + */ + GetSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.GetSnapshotRequest} message GetSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSnapshotRequest.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 GetSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + GetSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetSnapshotRequest"; + }; + + return GetSnapshotRequest; + })(); + + v1.CreateSnapshotRequest = (function() { + + /** + * Properties of a CreateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateSnapshotRequest + * @property {string|null} [parent] CreateSnapshotRequest parent + * @property {google.cloud.netapp.v1.ISnapshot|null} [snapshot] CreateSnapshotRequest snapshot + * @property {string|null} [snapshotId] CreateSnapshotRequest snapshotId + */ + + /** + * Constructs a new CreateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateSnapshotRequest. + * @implements ICreateSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest=} [properties] Properties to set + */ + function CreateSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSnapshotRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + */ + CreateSnapshotRequest.prototype.parent = ""; + + /** + * CreateSnapshotRequest snapshot. + * @member {google.cloud.netapp.v1.ISnapshot|null|undefined} snapshot + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + */ + CreateSnapshotRequest.prototype.snapshot = null; + + /** + * CreateSnapshotRequest snapshotId. + * @member {string} snapshotId + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + */ + CreateSnapshotRequest.prototype.snapshotId = ""; + + /** + * Creates a new CreateSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest instance + */ + CreateSnapshotRequest.create = function create(properties) { + return new CreateSnapshotRequest(properties); + }; + + /** + * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSnapshotRequest.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.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshot, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotId); + return writer; + }; + + /** + * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32()); + break; + } + case 3: { + message.snapshotId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSnapshotRequest.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.snapshot != null && message.hasOwnProperty("snapshot")) { + var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshot); + if (error) + return "snapshot." + error; + } + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (!$util.isString(message.snapshotId)) + return "snapshotId: string expected"; + return null; + }; + + /** + * Creates a CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest + */ + CreateSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateSnapshotRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateSnapshotRequest.snapshot: object expected"); + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshot); + } + if (object.snapshotId != null) + message.snapshotId = String(object.snapshotId); + return message; + }; + + /** + * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.CreateSnapshotRequest} message CreateSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.snapshot = null; + object.snapshotId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshot, options); + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + object.snapshotId = message.snapshotId; + return object; + }; + + /** + * Converts this CreateSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateSnapshotRequest"; + }; + + return CreateSnapshotRequest; + })(); + + v1.DeleteSnapshotRequest = (function() { + + /** + * Properties of a DeleteSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteSnapshotRequest + * @property {string|null} [name] DeleteSnapshotRequest name + */ + + /** + * Constructs a new DeleteSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteSnapshotRequest. + * @implements IDeleteSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest=} [properties] Properties to set + */ + function DeleteSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSnapshotRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @instance + */ + DeleteSnapshotRequest.prototype.name = ""; + + /** + * Creates a new DeleteSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest instance + */ + DeleteSnapshotRequest.create = function create(properties) { + return new DeleteSnapshotRequest(properties); + }; + + /** + * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSnapshotRequest.encode = function encode(message, writer) { + 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 DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteSnapshotRequest(); + 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 DeleteSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSnapshotRequest.verify = function verify(message) { + if (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 DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest + */ + DeleteSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.DeleteSnapshotRequest} message DeleteSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSnapshotRequest.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 DeleteSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteSnapshotRequest"; + }; + + return DeleteSnapshotRequest; + })(); + + v1.UpdateSnapshotRequest = (function() { + + /** + * Properties of an UpdateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateSnapshotRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSnapshotRequest updateMask + * @property {google.cloud.netapp.v1.ISnapshot|null} [snapshot] UpdateSnapshotRequest snapshot + */ + + /** + * Constructs a new UpdateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateSnapshotRequest. + * @implements IUpdateSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest=} [properties] Properties to set + */ + function UpdateSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSnapshotRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @instance + */ + UpdateSnapshotRequest.prototype.updateMask = null; + + /** + * UpdateSnapshotRequest snapshot. + * @member {google.cloud.netapp.v1.ISnapshot|null|undefined} snapshot + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @instance + */ + UpdateSnapshotRequest.prototype.snapshot = null; + + /** + * Creates a new UpdateSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest instance + */ + UpdateSnapshotRequest.create = function create(properties) { + return new UpdateSnapshotRequest(properties); + }; + + /** + * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshot, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.snapshot != null && message.hasOwnProperty("snapshot")) { + var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshot); + if (error) + return "snapshot." + error; + } + return null; + }; + + /** + * Creates an UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest + */ + UpdateSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateSnapshotRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateSnapshotRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateSnapshotRequest.snapshot: object expected"); + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshot); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.UpdateSnapshotRequest} message UpdateSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.snapshot = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshot, options); + return object; + }; + + /** + * Converts this UpdateSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateSnapshotRequest"; + }; + + return UpdateSnapshotRequest; + })(); + + v1.Snapshot = (function() { + + /** + * Properties of a Snapshot. + * @memberof google.cloud.netapp.v1 + * @interface ISnapshot + * @property {string|null} [name] Snapshot name + * @property {google.cloud.netapp.v1.Snapshot.State|null} [state] Snapshot state + * @property {string|null} [stateDetails] Snapshot stateDetails + * @property {string|null} [description] Snapshot description + * @property {number|null} [usedBytes] Snapshot usedBytes + * @property {google.protobuf.ITimestamp|null} [createTime] Snapshot createTime + * @property {Object.|null} [labels] Snapshot labels + */ + + /** + * Constructs a new Snapshot. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {google.cloud.netapp.v1.ISnapshot=} [properties] Properties to set + */ + function Snapshot(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]]; + } + + /** + * Snapshot name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.name = ""; + + /** + * Snapshot state. + * @member {google.cloud.netapp.v1.Snapshot.State} state + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.state = 0; + + /** + * Snapshot stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.stateDetails = ""; + + /** + * Snapshot description. + * @member {string} description + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.description = ""; + + /** + * Snapshot usedBytes. + * @member {number} usedBytes + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.usedBytes = 0; + + /** + * Snapshot createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.createTime = null; + + /** + * Snapshot labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.labels = $util.emptyObject; + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.ISnapshot=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.usedBytes != null && Object.hasOwnProperty.call(message, "usedBytes")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.usedBytes); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Snapshot(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.usedBytes = reader.double(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.verify = function verify(message) { + if (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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.usedBytes != null && message.hasOwnProperty("usedBytes")) + if (typeof message.usedBytes !== "number") + return "usedBytes: number expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Snapshot) + return object; + var message = new $root.google.cloud.netapp.v1.Snapshot(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "DISABLED": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.description != null) + message.description = String(object.description); + if (object.usedBytes != null) + message.usedBytes = Number(object.usedBytes); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Snapshot.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Snapshot.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 Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.description = ""; + object.usedBytes = 0; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Snapshot.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Snapshot.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.usedBytes != null && message.hasOwnProperty("usedBytes")) + object.usedBytes = options.json && !isFinite(message.usedBytes) ? String(message.usedBytes) : message.usedBytes; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Snapshot + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Snapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Snapshot"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.Snapshot.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} DISABLED=5 DISABLED value + * @property {number} ERROR=6 ERROR value + */ + Snapshot.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "DISABLED"] = 5; + values[valuesById[6] = "ERROR"] = 6; + return values; + })(); + + return Snapshot; + })(); + + v1.GetStoragePoolRequest = (function() { + + /** + * Properties of a GetStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetStoragePoolRequest + * @property {string|null} [name] GetStoragePoolRequest name + */ + + /** + * Constructs a new GetStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetStoragePoolRequest. + * @implements IGetStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest=} [properties] Properties to set + */ + function GetStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetStoragePoolRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @instance + */ + GetStoragePoolRequest.prototype.name = ""; + + /** + * Creates a new GetStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest instance + */ + GetStoragePoolRequest.create = function create(properties) { + return new GetStoragePoolRequest(properties); + }; + + /** + * Encodes the specified GetStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} message GetStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetStoragePoolRequest.encode = function encode(message, writer) { + 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 GetStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} message GetStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetStoragePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetStoragePoolRequest(); + 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 GetStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetStoragePoolRequest.verify = function verify(message) { + if (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 GetStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest + */ + GetStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetStoragePoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.GetStoragePoolRequest} message GetStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetStoragePoolRequest.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 GetStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetStoragePoolRequest"; + }; + + return GetStoragePoolRequest; + })(); + + v1.ListStoragePoolsRequest = (function() { + + /** + * Properties of a ListStoragePoolsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListStoragePoolsRequest + * @property {string|null} [parent] ListStoragePoolsRequest parent + * @property {number|null} [pageSize] ListStoragePoolsRequest pageSize + * @property {string|null} [pageToken] ListStoragePoolsRequest pageToken + * @property {string|null} [orderBy] ListStoragePoolsRequest orderBy + * @property {string|null} [filter] ListStoragePoolsRequest filter + */ + + /** + * Constructs a new ListStoragePoolsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListStoragePoolsRequest. + * @implements IListStoragePoolsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest=} [properties] Properties to set + */ + function ListStoragePoolsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListStoragePoolsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.parent = ""; + + /** + * ListStoragePoolsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.pageSize = 0; + + /** + * ListStoragePoolsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.pageToken = ""; + + /** + * ListStoragePoolsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.orderBy = ""; + + /** + * ListStoragePoolsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.filter = ""; + + /** + * Creates a new ListStoragePoolsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest instance + */ + ListStoragePoolsRequest.create = function create(properties) { + return new ListStoragePoolsRequest(properties); + }; + + /** + * Encodes the specified ListStoragePoolsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} message ListStoragePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsRequest.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.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListStoragePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} message ListStoragePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListStoragePoolsRequest(); + 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.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListStoragePoolsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListStoragePoolsRequest.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.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListStoragePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest + */ + ListStoragePoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListStoragePoolsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListStoragePoolsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListStoragePoolsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.ListStoragePoolsRequest} message ListStoragePoolsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListStoragePoolsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListStoragePoolsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + * @returns {Object.} JSON object + */ + ListStoragePoolsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListStoragePoolsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListStoragePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListStoragePoolsRequest"; + }; + + return ListStoragePoolsRequest; + })(); + + v1.ListStoragePoolsResponse = (function() { + + /** + * Properties of a ListStoragePoolsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListStoragePoolsResponse + * @property {Array.|null} [storagePools] ListStoragePoolsResponse storagePools + * @property {string|null} [nextPageToken] ListStoragePoolsResponse nextPageToken + * @property {Array.|null} [unreachable] ListStoragePoolsResponse unreachable + */ + + /** + * Constructs a new ListStoragePoolsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListStoragePoolsResponse. + * @implements IListStoragePoolsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse=} [properties] Properties to set + */ + function ListStoragePoolsResponse(properties) { + this.storagePools = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListStoragePoolsResponse storagePools. + * @member {Array.} storagePools + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + */ + ListStoragePoolsResponse.prototype.storagePools = $util.emptyArray; + + /** + * ListStoragePoolsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + */ + ListStoragePoolsResponse.prototype.nextPageToken = ""; + + /** + * ListStoragePoolsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + */ + ListStoragePoolsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListStoragePoolsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse instance + */ + ListStoragePoolsResponse.create = function create(properties) { + return new ListStoragePoolsResponse(properties); + }; + + /** + * Encodes the specified ListStoragePoolsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse} message ListStoragePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storagePools != null && message.storagePools.length) + for (var i = 0; i < message.storagePools.length; ++i) + $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListStoragePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse} message ListStoragePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListStoragePoolsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.storagePools && message.storagePools.length)) + message.storagePools = []; + message.storagePools.push($root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListStoragePoolsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListStoragePoolsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.storagePools != null && message.hasOwnProperty("storagePools")) { + if (!Array.isArray(message.storagePools)) + return "storagePools: array expected"; + for (var i = 0; i < message.storagePools.length; ++i) { + var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePools[i]); + if (error) + return "storagePools." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListStoragePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse + */ + ListStoragePoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListStoragePoolsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListStoragePoolsResponse(); + if (object.storagePools) { + if (!Array.isArray(object.storagePools)) + throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.storagePools: array expected"); + message.storagePools = []; + for (var i = 0; i < object.storagePools.length; ++i) { + if (typeof object.storagePools[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.storagePools: object expected"); + message.storagePools[i] = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePools[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListStoragePoolsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.ListStoragePoolsResponse} message ListStoragePoolsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListStoragePoolsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.storagePools = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.storagePools && message.storagePools.length) { + object.storagePools = []; + for (var j = 0; j < message.storagePools.length; ++j) + object.storagePools[j] = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePools[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListStoragePoolsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + * @returns {Object.} JSON object + */ + ListStoragePoolsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListStoragePoolsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListStoragePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListStoragePoolsResponse"; + }; + + return ListStoragePoolsResponse; + })(); + + v1.CreateStoragePoolRequest = (function() { + + /** + * Properties of a CreateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateStoragePoolRequest + * @property {string|null} [parent] CreateStoragePoolRequest parent + * @property {string|null} [storagePoolId] CreateStoragePoolRequest storagePoolId + * @property {google.cloud.netapp.v1.IStoragePool|null} [storagePool] CreateStoragePoolRequest storagePool + */ + + /** + * Constructs a new CreateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateStoragePoolRequest. + * @implements ICreateStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest=} [properties] Properties to set + */ + function CreateStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateStoragePoolRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + */ + CreateStoragePoolRequest.prototype.parent = ""; + + /** + * CreateStoragePoolRequest storagePoolId. + * @member {string} storagePoolId + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + */ + CreateStoragePoolRequest.prototype.storagePoolId = ""; + + /** + * CreateStoragePoolRequest storagePool. + * @member {google.cloud.netapp.v1.IStoragePool|null|undefined} storagePool + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + */ + CreateStoragePoolRequest.prototype.storagePool = null; + + /** + * Creates a new CreateStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest instance + */ + CreateStoragePoolRequest.create = function create(properties) { + return new CreateStoragePoolRequest(properties); + }; + + /** + * Encodes the specified CreateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} message CreateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateStoragePoolRequest.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.storagePoolId != null && Object.hasOwnProperty.call(message, "storagePoolId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.storagePoolId); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} message CreateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateStoragePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateStoragePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.storagePoolId = reader.string(); + break; + } + case 3: { + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateStoragePoolRequest.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.storagePoolId != null && message.hasOwnProperty("storagePoolId")) + if (!$util.isString(message.storagePoolId)) + return "storagePoolId: string expected"; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) { + var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePool); + if (error) + return "storagePool." + error; + } + return null; + }; + + /** + * Creates a CreateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest + */ + CreateStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateStoragePoolRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.storagePoolId != null) + message.storagePoolId = String(object.storagePoolId); + if (object.storagePool != null) { + if (typeof object.storagePool !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateStoragePoolRequest.storagePool: object expected"); + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePool); + } + return message; + }; + + /** + * Creates a plain object from a CreateStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.CreateStoragePoolRequest} message CreateStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateStoragePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.storagePoolId = ""; + object.storagePool = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.storagePoolId != null && message.hasOwnProperty("storagePoolId")) + object.storagePoolId = message.storagePoolId; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePool, options); + return object; + }; + + /** + * Converts this CreateStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateStoragePoolRequest"; + }; + + return CreateStoragePoolRequest; + })(); + + v1.UpdateStoragePoolRequest = (function() { + + /** + * Properties of an UpdateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateStoragePoolRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStoragePoolRequest updateMask + * @property {google.cloud.netapp.v1.IStoragePool|null} [storagePool] UpdateStoragePoolRequest storagePool + */ + + /** + * Constructs a new UpdateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateStoragePoolRequest. + * @implements IUpdateStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest=} [properties] Properties to set + */ + function UpdateStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateStoragePoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @instance + */ + UpdateStoragePoolRequest.prototype.updateMask = null; + + /** + * UpdateStoragePoolRequest storagePool. + * @member {google.cloud.netapp.v1.IStoragePool|null|undefined} storagePool + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @instance + */ + UpdateStoragePoolRequest.prototype.storagePool = null; + + /** + * Creates a new UpdateStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest instance + */ + UpdateStoragePoolRequest.create = function create(properties) { + return new UpdateStoragePoolRequest(properties); + }; + + /** + * Encodes the specified UpdateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} message UpdateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateStoragePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} message UpdateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateStoragePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateStoragePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateStoragePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.storagePool != null && message.hasOwnProperty("storagePool")) { + var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePool); + if (error) + return "storagePool." + error; + } + return null; + }; + + /** + * Creates an UpdateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest + */ + UpdateStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateStoragePoolRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateStoragePoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.storagePool != null) { + if (typeof object.storagePool !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateStoragePoolRequest.storagePool: object expected"); + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePool); + } + return message; + }; + + /** + * Creates a plain object from an UpdateStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.UpdateStoragePoolRequest} message UpdateStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateStoragePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.storagePool = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePool, options); + return object; + }; + + /** + * Converts this UpdateStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateStoragePoolRequest"; + }; + + return UpdateStoragePoolRequest; + })(); + + v1.DeleteStoragePoolRequest = (function() { + + /** + * Properties of a DeleteStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteStoragePoolRequest + * @property {string|null} [name] DeleteStoragePoolRequest name + */ + + /** + * Constructs a new DeleteStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteStoragePoolRequest. + * @implements IDeleteStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest=} [properties] Properties to set + */ + function DeleteStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteStoragePoolRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @instance + */ + DeleteStoragePoolRequest.prototype.name = ""; + + /** + * Creates a new DeleteStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest instance + */ + DeleteStoragePoolRequest.create = function create(properties) { + return new DeleteStoragePoolRequest(properties); + }; + + /** + * Encodes the specified DeleteStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} message DeleteStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStoragePoolRequest.encode = function encode(message, writer) { + 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 DeleteStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} message DeleteStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStoragePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteStoragePoolRequest(); + 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 DeleteStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteStoragePoolRequest.verify = function verify(message) { + if (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 DeleteStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest + */ + DeleteStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteStoragePoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.DeleteStoragePoolRequest} message DeleteStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteStoragePoolRequest.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 DeleteStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteStoragePoolRequest"; + }; + + return DeleteStoragePoolRequest; + })(); + + v1.StoragePool = (function() { + + /** + * Properties of a StoragePool. + * @memberof google.cloud.netapp.v1 + * @interface IStoragePool + * @property {string|null} [name] StoragePool name + * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] StoragePool serviceLevel + * @property {number|Long|null} [capacityGib] StoragePool capacityGib + * @property {number|Long|null} [volumeCapacityGib] StoragePool volumeCapacityGib + * @property {number|null} [volumeCount] StoragePool volumeCount + * @property {google.cloud.netapp.v1.StoragePool.State|null} [state] StoragePool state + * @property {string|null} [stateDetails] StoragePool stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] StoragePool createTime + * @property {string|null} [description] StoragePool description + * @property {Object.|null} [labels] StoragePool labels + * @property {string|null} [network] StoragePool network + * @property {string|null} [activeDirectory] StoragePool activeDirectory + * @property {string|null} [kmsConfig] StoragePool kmsConfig + * @property {boolean|null} [ldapEnabled] StoragePool ldapEnabled + * @property {string|null} [psaRange] StoragePool psaRange + * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] StoragePool encryptionType + * @property {boolean|null} [globalAccessAllowed] StoragePool globalAccessAllowed + */ + + /** + * Constructs a new StoragePool. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a StoragePool. + * @implements IStoragePool + * @constructor + * @param {google.cloud.netapp.v1.IStoragePool=} [properties] Properties to set + */ + function StoragePool(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]]; + } + + /** + * StoragePool name. + * @member {string} name + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.name = ""; + + /** + * StoragePool serviceLevel. + * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.serviceLevel = 0; + + /** + * StoragePool capacityGib. + * @member {number|Long} capacityGib + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool volumeCapacityGib. + * @member {number|Long} volumeCapacityGib + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.volumeCapacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool volumeCount. + * @member {number} volumeCount + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.volumeCount = 0; + + /** + * StoragePool state. + * @member {google.cloud.netapp.v1.StoragePool.State} state + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.state = 0; + + /** + * StoragePool stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.stateDetails = ""; + + /** + * StoragePool createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.createTime = null; + + /** + * StoragePool description. + * @member {string} description + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.description = ""; + + /** + * StoragePool labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.labels = $util.emptyObject; + + /** + * StoragePool network. + * @member {string} network + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.network = ""; + + /** + * StoragePool activeDirectory. + * @member {string} activeDirectory + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.activeDirectory = ""; + + /** + * StoragePool kmsConfig. + * @member {string} kmsConfig + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.kmsConfig = ""; + + /** + * StoragePool ldapEnabled. + * @member {boolean} ldapEnabled + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.ldapEnabled = false; + + /** + * StoragePool psaRange. + * @member {string} psaRange + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.psaRange = ""; + + /** + * StoragePool encryptionType. + * @member {google.cloud.netapp.v1.EncryptionType} encryptionType + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.encryptionType = 0; + + /** + * StoragePool globalAccessAllowed. + * @member {boolean|null|undefined} globalAccessAllowed + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.globalAccessAllowed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StoragePool _globalAccessAllowed. + * @member {"globalAccessAllowed"|undefined} _globalAccessAllowed + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + Object.defineProperty(StoragePool.prototype, "_globalAccessAllowed", { + get: $util.oneOfGetter($oneOfFields = ["globalAccessAllowed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StoragePool instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.IStoragePool=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool instance + */ + StoragePool.create = function create(properties) { + return new StoragePool(properties); + }; + + /** + * Encodes the specified StoragePool message. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.IStoragePool} message StoragePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoragePool.encode = function encode(message, writer) { + 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.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.serviceLevel); + if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.capacityGib); + if (message.volumeCapacityGib != null && Object.hasOwnProperty.call(message, "volumeCapacityGib")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.volumeCapacityGib); + if (message.volumeCount != null && Object.hasOwnProperty.call(message, "volumeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.volumeCount); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateDetails); + 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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); + 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 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.network); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.activeDirectory); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.kmsConfig); + if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.ldapEnabled); + if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.psaRange); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.encryptionType); + if (message.globalAccessAllowed != null && Object.hasOwnProperty.call(message, "globalAccessAllowed")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.globalAccessAllowed); + return writer; + }; + + /** + * Encodes the specified StoragePool message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.IStoragePool} message StoragePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoragePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoragePool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoragePool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StoragePool(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.serviceLevel = reader.int32(); + break; + } + case 3: { + message.capacityGib = reader.int64(); + break; + } + case 4: { + message.volumeCapacityGib = reader.int64(); + break; + } + case 5: { + message.volumeCount = reader.int32(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.stateDetails = reader.string(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.description = reader.string(); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 11: { + message.network = reader.string(); + break; + } + case 12: { + message.activeDirectory = reader.string(); + break; + } + case 13: { + message.kmsConfig = reader.string(); + break; + } + case 14: { + message.ldapEnabled = reader.bool(); + break; + } + case 15: { + message.psaRange = reader.string(); + break; + } + case 16: { + message.encryptionType = reader.int32(); + break; + } + case 17: { + message.globalAccessAllowed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StoragePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoragePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoragePool message. + * @function verify + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoragePool.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.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (!$util.isInteger(message.capacityGib) && !(message.capacityGib && $util.isInteger(message.capacityGib.low) && $util.isInteger(message.capacityGib.high))) + return "capacityGib: integer|Long expected"; + if (message.volumeCapacityGib != null && message.hasOwnProperty("volumeCapacityGib")) + if (!$util.isInteger(message.volumeCapacityGib) && !(message.volumeCapacityGib && $util.isInteger(message.volumeCapacityGib.low) && $util.isInteger(message.volumeCapacityGib.high))) + return "volumeCapacityGib: integer|Long expected"; + if (message.volumeCount != null && message.hasOwnProperty("volumeCount")) + if (!$util.isInteger(message.volumeCount)) + return "volumeCount: integer expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: 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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + if (!$util.isString(message.activeDirectory)) + return "activeDirectory: string expected"; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + if (!$util.isString(message.kmsConfig)) + return "kmsConfig: string expected"; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + if (typeof message.ldapEnabled !== "boolean") + return "ldapEnabled: boolean expected"; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + if (!$util.isString(message.psaRange)) + return "psaRange: string expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.globalAccessAllowed != null && message.hasOwnProperty("globalAccessAllowed")) { + properties._globalAccessAllowed = 1; + if (typeof message.globalAccessAllowed !== "boolean") + return "globalAccessAllowed: boolean expected"; + } + return null; + }; + + /** + * Creates a StoragePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool + */ + StoragePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.StoragePool) + return object; + var message = new $root.google.cloud.netapp.v1.StoragePool(); + if (object.name != null) + message.name = String(object.name); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "PREMIUM": + case 1: + message.serviceLevel = 1; + break; + case "EXTREME": + case 2: + message.serviceLevel = 2; + break; + case "STANDARD": + case 3: + message.serviceLevel = 3; + break; + } + if (object.capacityGib != null) + if ($util.Long) + (message.capacityGib = $util.Long.fromValue(object.capacityGib)).unsigned = false; + else if (typeof object.capacityGib === "string") + message.capacityGib = parseInt(object.capacityGib, 10); + else if (typeof object.capacityGib === "number") + message.capacityGib = object.capacityGib; + else if (typeof object.capacityGib === "object") + message.capacityGib = new $util.LongBits(object.capacityGib.low >>> 0, object.capacityGib.high >>> 0).toNumber(); + if (object.volumeCapacityGib != null) + if ($util.Long) + (message.volumeCapacityGib = $util.Long.fromValue(object.volumeCapacityGib)).unsigned = false; + else if (typeof object.volumeCapacityGib === "string") + message.volumeCapacityGib = parseInt(object.volumeCapacityGib, 10); + else if (typeof object.volumeCapacityGib === "number") + message.volumeCapacityGib = object.volumeCapacityGib; + else if (typeof object.volumeCapacityGib === "object") + message.volumeCapacityGib = new $util.LongBits(object.volumeCapacityGib.low >>> 0, object.volumeCapacityGib.high >>> 0).toNumber(); + if (object.volumeCount != null) + message.volumeCount = object.volumeCount | 0; + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "RESTORING": + case 5: + message.state = 5; + break; + case "DISABLED": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.StoragePool.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.StoragePool.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.network != null) + message.network = String(object.network); + if (object.activeDirectory != null) + message.activeDirectory = String(object.activeDirectory); + if (object.kmsConfig != null) + message.kmsConfig = String(object.kmsConfig); + if (object.ldapEnabled != null) + message.ldapEnabled = Boolean(object.ldapEnabled); + if (object.psaRange != null) + message.psaRange = String(object.psaRange); + switch (object.encryptionType) { + default: + if (typeof object.encryptionType === "number") { + message.encryptionType = object.encryptionType; + break; + } + break; + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "SERVICE_MANAGED": + case 1: + message.encryptionType = 1; + break; + case "CLOUD_KMS": + case 2: + message.encryptionType = 2; + break; + } + if (object.globalAccessAllowed != null) + message.globalAccessAllowed = Boolean(object.globalAccessAllowed); + return message; + }; + + /** + * Creates a plain object from a StoragePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.StoragePool} message StoragePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoragePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.capacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.capacityGib = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.volumeCapacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.volumeCapacityGib = options.longs === String ? "0" : 0; + object.volumeCount = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.description = ""; + object.network = ""; + object.activeDirectory = ""; + object.kmsConfig = ""; + object.ldapEnabled = false; + object.psaRange = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] : message.serviceLevel; + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (typeof message.capacityGib === "number") + object.capacityGib = options.longs === String ? String(message.capacityGib) : message.capacityGib; + else + object.capacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.capacityGib) : options.longs === Number ? new $util.LongBits(message.capacityGib.low >>> 0, message.capacityGib.high >>> 0).toNumber() : message.capacityGib; + if (message.volumeCapacityGib != null && message.hasOwnProperty("volumeCapacityGib")) + if (typeof message.volumeCapacityGib === "number") + object.volumeCapacityGib = options.longs === String ? String(message.volumeCapacityGib) : message.volumeCapacityGib; + else + object.volumeCapacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.volumeCapacityGib) : options.longs === Number ? new $util.LongBits(message.volumeCapacityGib.low >>> 0, message.volumeCapacityGib.high >>> 0).toNumber() : message.volumeCapacityGib; + if (message.volumeCount != null && message.hasOwnProperty("volumeCount")) + object.volumeCount = message.volumeCount; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.StoragePool.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.StoragePool.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = message.activeDirectory; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = message.kmsConfig; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + object.ldapEnabled = message.ldapEnabled; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + object.psaRange = message.psaRange; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + object.encryptionType = options.enums === String ? $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.globalAccessAllowed != null && message.hasOwnProperty("globalAccessAllowed")) { + object.globalAccessAllowed = message.globalAccessAllowed; + if (options.oneofs) + object._globalAccessAllowed = "globalAccessAllowed"; + } + return object; + }; + + /** + * Converts this StoragePool to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + * @returns {Object.} JSON object + */ + StoragePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoragePool + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoragePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.StoragePool"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.StoragePool.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} RESTORING=5 RESTORING value + * @property {number} DISABLED=6 DISABLED value + * @property {number} ERROR=7 ERROR value + */ + StoragePool.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "RESTORING"] = 5; + values[valuesById[6] = "DISABLED"] = 6; + values[valuesById[7] = "ERROR"] = 7; + return values; + })(); + + return StoragePool; + })(); + + /** + * ServiceLevel enum. + * @name google.cloud.netapp.v1.ServiceLevel + * @enum {number} + * @property {number} SERVICE_LEVEL_UNSPECIFIED=0 SERVICE_LEVEL_UNSPECIFIED value + * @property {number} PREMIUM=1 PREMIUM value + * @property {number} EXTREME=2 EXTREME value + * @property {number} STANDARD=3 STANDARD value + */ + v1.ServiceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREMIUM"] = 1; + values[valuesById[2] = "EXTREME"] = 2; + values[valuesById[3] = "STANDARD"] = 3; + return values; + })(); + + /** + * EncryptionType enum. + * @name google.cloud.netapp.v1.EncryptionType + * @enum {number} + * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value + * @property {number} SERVICE_MANAGED=1 SERVICE_MANAGED value + * @property {number} CLOUD_KMS=2 CLOUD_KMS value + */ + v1.EncryptionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SERVICE_MANAGED"] = 1; + values[valuesById[2] = "CLOUD_KMS"] = 2; + return values; + })(); + + /** + * Protocols enum. + * @name google.cloud.netapp.v1.Protocols + * @enum {number} + * @property {number} PROTOCOLS_UNSPECIFIED=0 PROTOCOLS_UNSPECIFIED value + * @property {number} NFSV3=1 NFSV3 value + * @property {number} NFSV4=2 NFSV4 value + * @property {number} SMB=3 SMB value + */ + v1.Protocols = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROTOCOLS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NFSV3"] = 1; + values[valuesById[2] = "NFSV4"] = 2; + values[valuesById[3] = "SMB"] = 3; + return values; + })(); + + /** + * AccessType enum. + * @name google.cloud.netapp.v1.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} READ_ONLY=1 READ_ONLY value + * @property {number} READ_WRITE=2 READ_WRITE value + * @property {number} READ_NONE=3 READ_NONE value + */ + v1.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_ONLY"] = 1; + values[valuesById[2] = "READ_WRITE"] = 2; + values[valuesById[3] = "READ_NONE"] = 3; + return values; + })(); + + /** + * SMBSettings enum. + * @name google.cloud.netapp.v1.SMBSettings + * @enum {number} + * @property {number} SMB_SETTINGS_UNSPECIFIED=0 SMB_SETTINGS_UNSPECIFIED value + * @property {number} ENCRYPT_DATA=1 ENCRYPT_DATA value + * @property {number} BROWSABLE=2 BROWSABLE value + * @property {number} CHANGE_NOTIFY=3 CHANGE_NOTIFY value + * @property {number} NON_BROWSABLE=4 NON_BROWSABLE value + * @property {number} OPLOCKS=5 OPLOCKS value + * @property {number} SHOW_SNAPSHOT=6 SHOW_SNAPSHOT value + * @property {number} SHOW_PREVIOUS_VERSIONS=7 SHOW_PREVIOUS_VERSIONS value + * @property {number} ACCESS_BASED_ENUMERATION=8 ACCESS_BASED_ENUMERATION value + * @property {number} CONTINUOUSLY_AVAILABLE=9 CONTINUOUSLY_AVAILABLE value + */ + v1.SMBSettings = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SMB_SETTINGS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENCRYPT_DATA"] = 1; + values[valuesById[2] = "BROWSABLE"] = 2; + values[valuesById[3] = "CHANGE_NOTIFY"] = 3; + values[valuesById[4] = "NON_BROWSABLE"] = 4; + values[valuesById[5] = "OPLOCKS"] = 5; + values[valuesById[6] = "SHOW_SNAPSHOT"] = 6; + values[valuesById[7] = "SHOW_PREVIOUS_VERSIONS"] = 7; + values[valuesById[8] = "ACCESS_BASED_ENUMERATION"] = 8; + values[valuesById[9] = "CONTINUOUSLY_AVAILABLE"] = 9; + return values; + })(); + + /** + * SecurityStyle enum. + * @name google.cloud.netapp.v1.SecurityStyle + * @enum {number} + * @property {number} SECURITY_STYLE_UNSPECIFIED=0 SECURITY_STYLE_UNSPECIFIED value + * @property {number} NTFS=1 NTFS value + * @property {number} UNIX=2 UNIX value + */ + v1.SecurityStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECURITY_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NTFS"] = 1; + values[valuesById[2] = "UNIX"] = 2; + return values; + })(); + + /** + * RestrictedAction enum. + * @name google.cloud.netapp.v1.RestrictedAction + * @enum {number} + * @property {number} RESTRICTED_ACTION_UNSPECIFIED=0 RESTRICTED_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + */ + v1.RestrictedAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + return values; + })(); + + v1.ListVolumesRequest = (function() { + + /** + * Properties of a ListVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListVolumesRequest + * @property {string|null} [parent] ListVolumesRequest parent + * @property {number|null} [pageSize] ListVolumesRequest pageSize + * @property {string|null} [pageToken] ListVolumesRequest pageToken + * @property {string|null} [filter] ListVolumesRequest filter + * @property {string|null} [orderBy] ListVolumesRequest orderBy + */ + + /** + * Constructs a new ListVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListVolumesRequest. + * @implements IListVolumesRequest + * @constructor + * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set + */ + function ListVolumesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVolumesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.parent = ""; + + /** + * ListVolumesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.pageSize = 0; + + /** + * ListVolumesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.pageToken = ""; + + /** + * ListVolumesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.filter = ""; + + /** + * ListVolumesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListVolumesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest instance + */ + ListVolumesRequest.create = function create(properties) { + return new ListVolumesRequest(properties); + }; + + /** + * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + 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 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVolumesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVolumesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + */ + ListVolumesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListVolumesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.ListVolumesRequest} message ListVolumesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVolumesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListVolumesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + * @returns {Object.} JSON object + */ + ListVolumesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVolumesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesRequest"; + }; + + return ListVolumesRequest; + })(); + + v1.ListVolumesResponse = (function() { + + /** + * Properties of a ListVolumesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListVolumesResponse + * @property {Array.|null} [volumes] ListVolumesResponse volumes + * @property {string|null} [nextPageToken] ListVolumesResponse nextPageToken + * @property {Array.|null} [unreachable] ListVolumesResponse unreachable + */ + + /** + * Constructs a new ListVolumesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListVolumesResponse. + * @implements IListVolumesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set + */ + function ListVolumesResponse(properties) { + this.volumes = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVolumesResponse volumes. + * @member {Array.} volumes + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + */ + ListVolumesResponse.prototype.volumes = $util.emptyArray; + + /** + * ListVolumesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + */ + ListVolumesResponse.prototype.nextPageToken = ""; + + /** + * ListVolumesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + */ + ListVolumesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListVolumesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse instance + */ + ListVolumesResponse.create = function create(properties) { + return new ListVolumesResponse(properties); + }; + + /** + * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.volumes != null && message.volumes.length) + for (var i = 0; i < message.volumes.length; ++i) + $root.google.cloud.netapp.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVolumesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVolumesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.volumes != null && message.hasOwnProperty("volumes")) { + if (!Array.isArray(message.volumes)) + return "volumes: array expected"; + for (var i = 0; i < message.volumes.length; ++i) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volumes[i]); + if (error) + return "volumes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListVolumesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + */ + ListVolumesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListVolumesResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); + if (object.volumes) { + if (!Array.isArray(object.volumes)) + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: array expected"); + message.volumes = []; + for (var i = 0; i < object.volumes.length; ++i) { + if (typeof object.volumes[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: object expected"); + message.volumes[i] = $root.google.cloud.netapp.v1.Volume.fromObject(object.volumes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.ListVolumesResponse} message ListVolumesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVolumesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.volumes = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.volumes && message.volumes.length) { + object.volumes = []; + for (var j = 0; j < message.volumes.length; ++j) + object.volumes[j] = $root.google.cloud.netapp.v1.Volume.toObject(message.volumes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListVolumesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + * @returns {Object.} JSON object + */ + ListVolumesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVolumesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVolumesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesResponse"; + }; + + return ListVolumesResponse; + })(); + + v1.GetVolumeRequest = (function() { + + /** + * Properties of a GetVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetVolumeRequest + * @property {string|null} [name] GetVolumeRequest name + */ + + /** + * Constructs a new GetVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetVolumeRequest. + * @implements IGetVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set + */ + function GetVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @instance + */ + GetVolumeRequest.prototype.name = ""; + + /** + * Creates a new GetVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest instance + */ + GetVolumeRequest.create = function create(properties) { + return new GetVolumeRequest(properties); + }; + + /** + * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVolumeRequest.encode = function encode(message, writer) { + 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 GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVolumeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); + 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 GetVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVolumeRequest.verify = function verify(message) { + if (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 GetVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + */ + GetVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.GetVolumeRequest} message GetVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVolumeRequest.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 GetVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + GetVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetVolumeRequest"; + }; + + return GetVolumeRequest; + })(); + + v1.CreateVolumeRequest = (function() { + + /** + * Properties of a CreateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateVolumeRequest + * @property {string|null} [parent] CreateVolumeRequest parent + * @property {string|null} [volumeId] CreateVolumeRequest volumeId + * @property {google.cloud.netapp.v1.IVolume|null} [volume] CreateVolumeRequest volume + */ + + /** + * Constructs a new CreateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateVolumeRequest. + * @implements ICreateVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set + */ + function CreateVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVolumeRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.parent = ""; + + /** + * CreateVolumeRequest volumeId. + * @member {string} volumeId + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.volumeId = ""; + + /** + * CreateVolumeRequest volume. + * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.volume = null; + + /** + * Creates a new CreateVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest instance + */ + CreateVolumeRequest.create = function create(properties) { + return new CreateVolumeRequest(properties); + }; + + /** + * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVolumeRequest.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.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); + if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) + $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVolumeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.volumeId = reader.string(); + break; + } + case 3: { + message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVolumeRequest.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.volumeId != null && message.hasOwnProperty("volumeId")) + if (!$util.isString(message.volumeId)) + return "volumeId: string expected"; + if (message.volume != null && message.hasOwnProperty("volume")) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); + if (error) + return "volume." + error; + } + return null; + }; + + /** + * Creates a CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + */ + CreateVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.volumeId != null) + message.volumeId = String(object.volumeId); + if (object.volume != null) { + if (typeof object.volume !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateVolumeRequest.volume: object expected"); + message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); + } + return message; + }; + + /** + * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.CreateVolumeRequest} message CreateVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.volumeId = ""; + object.volume = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + object.volumeId = message.volumeId; + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + return object; + }; + + /** + * Converts this CreateVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateVolumeRequest"; + }; + + return CreateVolumeRequest; + })(); + + v1.UpdateVolumeRequest = (function() { + + /** + * Properties of an UpdateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateVolumeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVolumeRequest updateMask + * @property {google.cloud.netapp.v1.IVolume|null} [volume] UpdateVolumeRequest volume + */ + + /** + * Constructs a new UpdateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateVolumeRequest. + * @implements IUpdateVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set + */ + function UpdateVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateVolumeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + */ + UpdateVolumeRequest.prototype.updateMask = null; + + /** + * UpdateVolumeRequest volume. + * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + */ + UpdateVolumeRequest.prototype.volume = null; + + /** + * Creates a new UpdateVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest instance + */ + UpdateVolumeRequest.create = function create(properties) { + return new UpdateVolumeRequest(properties); + }; + + /** + * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) + $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVolumeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.volume != null && message.hasOwnProperty("volume")) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); + if (error) + return "volume." + error; + } + return null; + }; + + /** + * Creates an UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + */ + UpdateVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.volume != null) { + if (typeof object.volume !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.volume: object expected"); + message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); + } + return message; + }; + + /** + * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.UpdateVolumeRequest} message UpdateVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.volume = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + return object; + }; + + /** + * Converts this UpdateVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateVolumeRequest"; + }; + + return UpdateVolumeRequest; + })(); + + v1.DeleteVolumeRequest = (function() { + + /** + * Properties of a DeleteVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteVolumeRequest + * @property {string|null} [name] DeleteVolumeRequest name + * @property {boolean|null} [force] DeleteVolumeRequest force + */ + + /** + * Constructs a new DeleteVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteVolumeRequest. + * @implements IDeleteVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set + */ + function DeleteVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + */ + DeleteVolumeRequest.prototype.name = ""; + + /** + * DeleteVolumeRequest force. + * @member {boolean} force + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + */ + DeleteVolumeRequest.prototype.force = false; + + /** + * Creates a new DeleteVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest instance + */ + DeleteVolumeRequest.create = function create(properties) { + return new DeleteVolumeRequest(properties); + }; + + /** + * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVolumeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + */ + DeleteVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.DeleteVolumeRequest} message DeleteVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteVolumeRequest"; + }; + + return DeleteVolumeRequest; + })(); + + v1.RevertVolumeRequest = (function() { + + /** + * Properties of a RevertVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IRevertVolumeRequest + * @property {string|null} [name] RevertVolumeRequest name + * @property {string|null} [snapshotId] RevertVolumeRequest snapshotId + */ + + /** + * Constructs a new RevertVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a RevertVolumeRequest. + * @implements IRevertVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set + */ + function RevertVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevertVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + */ + RevertVolumeRequest.prototype.name = ""; + + /** + * RevertVolumeRequest snapshotId. + * @member {string} snapshotId + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + */ + RevertVolumeRequest.prototype.snapshotId = ""; + + /** + * Creates a new RevertVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest instance + */ + RevertVolumeRequest.create = function create(properties) { + return new RevertVolumeRequest(properties); + }; + + /** + * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevertVolumeRequest.encode = function encode(message, writer) { + 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.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotId); + return writer; + }; + + /** + * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevertVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevertVolumeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.snapshotId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevertVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevertVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevertVolumeRequest.verify = function verify(message) { + if (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.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (!$util.isString(message.snapshotId)) + return "snapshotId: string expected"; + return null; + }; + + /** + * Creates a RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + */ + RevertVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.RevertVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.snapshotId != null) + message.snapshotId = String(object.snapshotId); + return message; + }; + + /** + * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.RevertVolumeRequest} message RevertVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevertVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.snapshotId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + object.snapshotId = message.snapshotId; + return object; + }; + + /** + * Converts this RevertVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + RevertVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RevertVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevertVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.RevertVolumeRequest"; + }; + + return RevertVolumeRequest; + })(); + + v1.Volume = (function() { + + /** + * Properties of a Volume. + * @memberof google.cloud.netapp.v1 + * @interface IVolume + * @property {string|null} [name] Volume name + * @property {google.cloud.netapp.v1.Volume.State|null} [state] Volume state + * @property {string|null} [stateDetails] Volume stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] Volume createTime + * @property {string|null} [shareName] Volume shareName + * @property {string|null} [psaRange] Volume psaRange + * @property {string|null} [storagePool] Volume storagePool + * @property {string|null} [network] Volume network + * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] Volume serviceLevel + * @property {number|Long|null} [capacityGib] Volume capacityGib + * @property {google.cloud.netapp.v1.IExportPolicy|null} [exportPolicy] Volume exportPolicy + * @property {Array.|null} [protocols] Volume protocols + * @property {Array.|null} [smbSettings] Volume smbSettings + * @property {Array.|null} [mountOptions] Volume mountOptions + * @property {string|null} [unixPermissions] Volume unixPermissions + * @property {Object.|null} [labels] Volume labels + * @property {string|null} [description] Volume description + * @property {google.cloud.netapp.v1.ISnapshotPolicy|null} [snapshotPolicy] Volume snapshotPolicy + * @property {number|null} [snapReserve] Volume snapReserve + * @property {boolean|null} [snapshotDirectory] Volume snapshotDirectory + * @property {number|Long|null} [usedGib] Volume usedGib + * @property {google.cloud.netapp.v1.SecurityStyle|null} [securityStyle] Volume securityStyle + * @property {boolean|null} [kerberosEnabled] Volume kerberosEnabled + * @property {boolean|null} [ldapEnabled] Volume ldapEnabled + * @property {string|null} [activeDirectory] Volume activeDirectory + * @property {google.cloud.netapp.v1.IRestoreParameters|null} [restoreParameters] Volume restoreParameters + * @property {string|null} [kmsConfig] Volume kmsConfig + * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] Volume encryptionType + * @property {boolean|null} [hasReplication] Volume hasReplication + * @property {Array.|null} [restrictedActions] Volume restrictedActions + */ + + /** + * Constructs a new Volume. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Volume. + * @implements IVolume + * @constructor + * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set + */ + function Volume(properties) { + this.protocols = []; + this.smbSettings = []; + this.mountOptions = []; + this.labels = {}; + this.restrictedActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Volume name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.name = ""; + + /** + * Volume state. + * @member {google.cloud.netapp.v1.Volume.State} state + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.state = 0; + + /** + * Volume stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.stateDetails = ""; + + /** + * Volume createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.createTime = null; + + /** + * Volume shareName. + * @member {string} shareName + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.shareName = ""; + + /** + * Volume psaRange. + * @member {string} psaRange + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.psaRange = ""; + + /** + * Volume storagePool. + * @member {string} storagePool + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.storagePool = ""; + + /** + * Volume network. + * @member {string} network + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.network = ""; + + /** + * Volume serviceLevel. + * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.serviceLevel = 0; + + /** + * Volume capacityGib. + * @member {number|Long} capacityGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume exportPolicy. + * @member {google.cloud.netapp.v1.IExportPolicy|null|undefined} exportPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.exportPolicy = null; + + /** + * Volume protocols. + * @member {Array.} protocols + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.protocols = $util.emptyArray; + + /** + * Volume smbSettings. + * @member {Array.} smbSettings + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.smbSettings = $util.emptyArray; + + /** + * Volume mountOptions. + * @member {Array.} mountOptions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.mountOptions = $util.emptyArray; + + /** + * Volume unixPermissions. + * @member {string} unixPermissions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.unixPermissions = ""; + + /** + * Volume labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.labels = $util.emptyObject; + + /** + * Volume description. + * @member {string} description + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.description = ""; + + /** + * Volume snapshotPolicy. + * @member {google.cloud.netapp.v1.ISnapshotPolicy|null|undefined} snapshotPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapshotPolicy = null; + + /** + * Volume snapReserve. + * @member {number} snapReserve + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapReserve = 0; + + /** + * Volume snapshotDirectory. + * @member {boolean} snapshotDirectory + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapshotDirectory = false; + + /** + * Volume usedGib. + * @member {number|Long} usedGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.usedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume securityStyle. + * @member {google.cloud.netapp.v1.SecurityStyle} securityStyle + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.securityStyle = 0; + + /** + * Volume kerberosEnabled. + * @member {boolean} kerberosEnabled + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.kerberosEnabled = false; + + /** + * Volume ldapEnabled. + * @member {boolean} ldapEnabled + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.ldapEnabled = false; + + /** + * Volume activeDirectory. + * @member {string} activeDirectory + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.activeDirectory = ""; + + /** + * Volume restoreParameters. + * @member {google.cloud.netapp.v1.IRestoreParameters|null|undefined} restoreParameters + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.restoreParameters = null; + + /** + * Volume kmsConfig. + * @member {string} kmsConfig + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.kmsConfig = ""; + + /** + * Volume encryptionType. + * @member {google.cloud.netapp.v1.EncryptionType} encryptionType + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.encryptionType = 0; + + /** + * Volume hasReplication. + * @member {boolean} hasReplication + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.hasReplication = false; + + /** + * Volume restrictedActions. + * @member {Array.} restrictedActions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.restrictedActions = $util.emptyArray; + + /** + * Creates a new Volume instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Volume} Volume instance + */ + Volume.create = function create(properties) { + return new Volume(properties); + }; + + /** + * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + 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.shareName != null && Object.hasOwnProperty.call(message, "shareName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.shareName); + if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.psaRange); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.storagePool); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.serviceLevel); + if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.capacityGib); + if (message.exportPolicy != null && Object.hasOwnProperty.call(message, "exportPolicy")) + $root.google.cloud.netapp.v1.ExportPolicy.encode(message.exportPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.protocols != null && message.protocols.length) { + writer.uint32(/* id 12, wireType 2 =*/98).fork(); + for (var i = 0; i < message.protocols.length; ++i) + writer.int32(message.protocols[i]); + writer.ldelim(); + } + if (message.smbSettings != null && message.smbSettings.length) { + writer.uint32(/* id 13, wireType 2 =*/106).fork(); + for (var i = 0; i < message.smbSettings.length; ++i) + writer.int32(message.smbSettings[i]); + writer.ldelim(); + } + if (message.mountOptions != null && message.mountOptions.length) + for (var i = 0; i < message.mountOptions.length; ++i) + $root.google.cloud.netapp.v1.MountOption.encode(message.mountOptions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.unixPermissions != null && Object.hasOwnProperty.call(message, "unixPermissions")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.unixPermissions); + 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 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); + if (message.snapshotPolicy != null && Object.hasOwnProperty.call(message, "snapshotPolicy")) + $root.google.cloud.netapp.v1.SnapshotPolicy.encode(message.snapshotPolicy, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.snapReserve != null && Object.hasOwnProperty.call(message, "snapReserve")) + writer.uint32(/* id 19, wireType 1 =*/153).double(message.snapReserve); + if (message.snapshotDirectory != null && Object.hasOwnProperty.call(message, "snapshotDirectory")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.snapshotDirectory); + if (message.usedGib != null && Object.hasOwnProperty.call(message, "usedGib")) + writer.uint32(/* id 21, wireType 0 =*/168).int64(message.usedGib); + if (message.securityStyle != null && Object.hasOwnProperty.call(message, "securityStyle")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.securityStyle); + if (message.kerberosEnabled != null && Object.hasOwnProperty.call(message, "kerberosEnabled")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.kerberosEnabled); + if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.ldapEnabled); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.activeDirectory); + if (message.restoreParameters != null && Object.hasOwnProperty.call(message, "restoreParameters")) + $root.google.cloud.netapp.v1.RestoreParameters.encode(message.restoreParameters, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.kmsConfig); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.encryptionType); + if (message.hasReplication != null && Object.hasOwnProperty.call(message, "hasReplication")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.hasReplication); + if (message.restrictedActions != null && message.restrictedActions.length) { + writer.uint32(/* id 31, wireType 2 =*/250).fork(); + for (var i = 0; i < message.restrictedActions.length; ++i) + writer.int32(message.restrictedActions[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Volume message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.shareName = reader.string(); + break; + } + case 6: { + message.psaRange = reader.string(); + break; + } + case 7: { + message.storagePool = reader.string(); + break; + } + case 8: { + message.network = reader.string(); + break; + } + case 9: { + message.serviceLevel = reader.int32(); + break; + } + case 10: { + message.capacityGib = reader.int64(); + break; + } + case 11: { + message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.protocols && message.protocols.length)) + message.protocols = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.protocols.push(reader.int32()); + } else + message.protocols.push(reader.int32()); + break; + } + case 13: { + if (!(message.smbSettings && message.smbSettings.length)) + message.smbSettings = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.smbSettings.push(reader.int32()); + } else + message.smbSettings.push(reader.int32()); + break; + } + case 14: { + if (!(message.mountOptions && message.mountOptions.length)) + message.mountOptions = []; + message.mountOptions.push($root.google.cloud.netapp.v1.MountOption.decode(reader, reader.uint32())); + break; + } + case 15: { + message.unixPermissions = reader.string(); + break; + } + case 16: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 17: { + message.description = reader.string(); + break; + } + case 18: { + message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.decode(reader, reader.uint32()); + break; + } + case 19: { + message.snapReserve = reader.double(); + break; + } + case 20: { + message.snapshotDirectory = reader.bool(); + break; + } + case 21: { + message.usedGib = reader.int64(); + break; + } + case 22: { + message.securityStyle = reader.int32(); + break; + } + case 23: { + message.kerberosEnabled = reader.bool(); + break; + } + case 24: { + message.ldapEnabled = reader.bool(); + break; + } + case 25: { + message.activeDirectory = reader.string(); + break; + } + case 26: { + message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.decode(reader, reader.uint32()); + break; + } + case 27: { + message.kmsConfig = reader.string(); + break; + } + case 28: { + message.encryptionType = reader.int32(); + break; + } + case 29: { + message.hasReplication = reader.bool(); + break; + } + case 31: { + if (!(message.restrictedActions && message.restrictedActions.length)) + message.restrictedActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedActions.push(reader.int32()); + } else + message.restrictedActions.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Volume message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Volume message. + * @function verify + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Volume.verify = function verify(message) { + if (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.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.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: 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.shareName != null && message.hasOwnProperty("shareName")) + if (!$util.isString(message.shareName)) + return "shareName: string expected"; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + if (!$util.isString(message.psaRange)) + return "psaRange: string expected"; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + if (!$util.isString(message.storagePool)) + return "storagePool: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (!$util.isInteger(message.capacityGib) && !(message.capacityGib && $util.isInteger(message.capacityGib.low) && $util.isInteger(message.capacityGib.high))) + return "capacityGib: integer|Long expected"; + if (message.exportPolicy != null && message.hasOwnProperty("exportPolicy")) { + var error = $root.google.cloud.netapp.v1.ExportPolicy.verify(message.exportPolicy); + if (error) + return "exportPolicy." + error; + } + if (message.protocols != null && message.hasOwnProperty("protocols")) { + if (!Array.isArray(message.protocols)) + return "protocols: array expected"; + for (var i = 0; i < message.protocols.length; ++i) + switch (message.protocols[i]) { + default: + return "protocols: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.smbSettings != null && message.hasOwnProperty("smbSettings")) { + if (!Array.isArray(message.smbSettings)) + return "smbSettings: array expected"; + for (var i = 0; i < message.smbSettings.length; ++i) + switch (message.smbSettings[i]) { + default: + return "smbSettings: 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.mountOptions != null && message.hasOwnProperty("mountOptions")) { + if (!Array.isArray(message.mountOptions)) + return "mountOptions: array expected"; + for (var i = 0; i < message.mountOptions.length; ++i) { + var error = $root.google.cloud.netapp.v1.MountOption.verify(message.mountOptions[i]); + if (error) + return "mountOptions." + error; + } + } + if (message.unixPermissions != null && message.hasOwnProperty("unixPermissions")) + if (!$util.isString(message.unixPermissions)) + return "unixPermissions: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.snapshotPolicy != null && message.hasOwnProperty("snapshotPolicy")) { + var error = $root.google.cloud.netapp.v1.SnapshotPolicy.verify(message.snapshotPolicy); + if (error) + return "snapshotPolicy." + error; + } + if (message.snapReserve != null && message.hasOwnProperty("snapReserve")) + if (typeof message.snapReserve !== "number") + return "snapReserve: number expected"; + if (message.snapshotDirectory != null && message.hasOwnProperty("snapshotDirectory")) + if (typeof message.snapshotDirectory !== "boolean") + return "snapshotDirectory: boolean expected"; + if (message.usedGib != null && message.hasOwnProperty("usedGib")) + if (!$util.isInteger(message.usedGib) && !(message.usedGib && $util.isInteger(message.usedGib.low) && $util.isInteger(message.usedGib.high))) + return "usedGib: integer|Long expected"; + if (message.securityStyle != null && message.hasOwnProperty("securityStyle")) + switch (message.securityStyle) { + default: + return "securityStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.kerberosEnabled != null && message.hasOwnProperty("kerberosEnabled")) + if (typeof message.kerberosEnabled !== "boolean") + return "kerberosEnabled: boolean expected"; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + if (typeof message.ldapEnabled !== "boolean") + return "ldapEnabled: boolean expected"; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + if (!$util.isString(message.activeDirectory)) + return "activeDirectory: string expected"; + if (message.restoreParameters != null && message.hasOwnProperty("restoreParameters")) { + var error = $root.google.cloud.netapp.v1.RestoreParameters.verify(message.restoreParameters); + if (error) + return "restoreParameters." + error; + } + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + if (!$util.isString(message.kmsConfig)) + return "kmsConfig: string expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.hasReplication != null && message.hasOwnProperty("hasReplication")) + if (typeof message.hasReplication !== "boolean") + return "hasReplication: boolean expected"; + if (message.restrictedActions != null && message.hasOwnProperty("restrictedActions")) { + if (!Array.isArray(message.restrictedActions)) + return "restrictedActions: array expected"; + for (var i = 0; i < message.restrictedActions.length; ++i) + switch (message.restrictedActions[i]) { + default: + return "restrictedActions: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a Volume message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Volume} Volume + */ + Volume.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Volume) + return object; + var message = new $root.google.cloud.netapp.v1.Volume(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "RESTORING": + case 5: + message.state = 5; + break; + case "DISABLED": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.shareName != null) + message.shareName = String(object.shareName); + if (object.psaRange != null) + message.psaRange = String(object.psaRange); + if (object.storagePool != null) + message.storagePool = String(object.storagePool); + if (object.network != null) + message.network = String(object.network); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "PREMIUM": + case 1: + message.serviceLevel = 1; + break; + case "EXTREME": + case 2: + message.serviceLevel = 2; + break; + case "STANDARD": + case 3: + message.serviceLevel = 3; + break; + } + if (object.capacityGib != null) + if ($util.Long) + (message.capacityGib = $util.Long.fromValue(object.capacityGib)).unsigned = false; + else if (typeof object.capacityGib === "string") + message.capacityGib = parseInt(object.capacityGib, 10); + else if (typeof object.capacityGib === "number") + message.capacityGib = object.capacityGib; + else if (typeof object.capacityGib === "object") + message.capacityGib = new $util.LongBits(object.capacityGib.low >>> 0, object.capacityGib.high >>> 0).toNumber(); + if (object.exportPolicy != null) { + if (typeof object.exportPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.exportPolicy: object expected"); + message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.fromObject(object.exportPolicy); + } + if (object.protocols) { + if (!Array.isArray(object.protocols)) + throw TypeError(".google.cloud.netapp.v1.Volume.protocols: array expected"); + message.protocols = []; + for (var i = 0; i < object.protocols.length; ++i) + switch (object.protocols[i]) { + default: + if (typeof object.protocols[i] === "number") { + message.protocols[i] = object.protocols[i]; + break; + } + case "PROTOCOLS_UNSPECIFIED": + case 0: + message.protocols[i] = 0; + break; + case "NFSV3": + case 1: + message.protocols[i] = 1; + break; + case "NFSV4": + case 2: + message.protocols[i] = 2; + break; + case "SMB": + case 3: + message.protocols[i] = 3; + break; + } + } + if (object.smbSettings) { + if (!Array.isArray(object.smbSettings)) + throw TypeError(".google.cloud.netapp.v1.Volume.smbSettings: array expected"); + message.smbSettings = []; + for (var i = 0; i < object.smbSettings.length; ++i) + switch (object.smbSettings[i]) { + default: + if (typeof object.smbSettings[i] === "number") { + message.smbSettings[i] = object.smbSettings[i]; + break; + } + case "SMB_SETTINGS_UNSPECIFIED": + case 0: + message.smbSettings[i] = 0; + break; + case "ENCRYPT_DATA": + case 1: + message.smbSettings[i] = 1; + break; + case "BROWSABLE": + case 2: + message.smbSettings[i] = 2; + break; + case "CHANGE_NOTIFY": + case 3: + message.smbSettings[i] = 3; + break; + case "NON_BROWSABLE": + case 4: + message.smbSettings[i] = 4; + break; + case "OPLOCKS": + case 5: + message.smbSettings[i] = 5; + break; + case "SHOW_SNAPSHOT": + case 6: + message.smbSettings[i] = 6; + break; + case "SHOW_PREVIOUS_VERSIONS": + case 7: + message.smbSettings[i] = 7; + break; + case "ACCESS_BASED_ENUMERATION": + case 8: + message.smbSettings[i] = 8; + break; + case "CONTINUOUSLY_AVAILABLE": + case 9: + message.smbSettings[i] = 9; + break; + } + } + if (object.mountOptions) { + if (!Array.isArray(object.mountOptions)) + throw TypeError(".google.cloud.netapp.v1.Volume.mountOptions: array expected"); + message.mountOptions = []; + for (var i = 0; i < object.mountOptions.length; ++i) { + if (typeof object.mountOptions[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.mountOptions: object expected"); + message.mountOptions[i] = $root.google.cloud.netapp.v1.MountOption.fromObject(object.mountOptions[i]); + } + } + if (object.unixPermissions != null) + message.unixPermissions = String(object.unixPermissions); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + if (object.snapshotPolicy != null) { + if (typeof object.snapshotPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.snapshotPolicy: object expected"); + message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.fromObject(object.snapshotPolicy); + } + if (object.snapReserve != null) + message.snapReserve = Number(object.snapReserve); + if (object.snapshotDirectory != null) + message.snapshotDirectory = Boolean(object.snapshotDirectory); + if (object.usedGib != null) + if ($util.Long) + (message.usedGib = $util.Long.fromValue(object.usedGib)).unsigned = false; + else if (typeof object.usedGib === "string") + message.usedGib = parseInt(object.usedGib, 10); + else if (typeof object.usedGib === "number") + message.usedGib = object.usedGib; + else if (typeof object.usedGib === "object") + message.usedGib = new $util.LongBits(object.usedGib.low >>> 0, object.usedGib.high >>> 0).toNumber(); + switch (object.securityStyle) { + default: + if (typeof object.securityStyle === "number") { + message.securityStyle = object.securityStyle; + break; + } + break; + case "SECURITY_STYLE_UNSPECIFIED": + case 0: + message.securityStyle = 0; + break; + case "NTFS": + case 1: + message.securityStyle = 1; + break; + case "UNIX": + case 2: + message.securityStyle = 2; + break; + } + if (object.kerberosEnabled != null) + message.kerberosEnabled = Boolean(object.kerberosEnabled); + if (object.ldapEnabled != null) + message.ldapEnabled = Boolean(object.ldapEnabled); + if (object.activeDirectory != null) + message.activeDirectory = String(object.activeDirectory); + if (object.restoreParameters != null) { + if (typeof object.restoreParameters !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.restoreParameters: object expected"); + message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.fromObject(object.restoreParameters); + } + if (object.kmsConfig != null) + message.kmsConfig = String(object.kmsConfig); + switch (object.encryptionType) { + default: + if (typeof object.encryptionType === "number") { + message.encryptionType = object.encryptionType; + break; + } + break; + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "SERVICE_MANAGED": + case 1: + message.encryptionType = 1; + break; + case "CLOUD_KMS": + case 2: + message.encryptionType = 2; + break; + } + if (object.hasReplication != null) + message.hasReplication = Boolean(object.hasReplication); + if (object.restrictedActions) { + if (!Array.isArray(object.restrictedActions)) + throw TypeError(".google.cloud.netapp.v1.Volume.restrictedActions: array expected"); + message.restrictedActions = []; + for (var i = 0; i < object.restrictedActions.length; ++i) + switch (object.restrictedActions[i]) { + default: + if (typeof object.restrictedActions[i] === "number") { + message.restrictedActions[i] = object.restrictedActions[i]; + break; + } + case "RESTRICTED_ACTION_UNSPECIFIED": + case 0: + message.restrictedActions[i] = 0; + break; + case "DELETE": + case 1: + message.restrictedActions[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Volume message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.Volume} message Volume + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Volume.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.protocols = []; + object.smbSettings = []; + object.mountOptions = []; + object.restrictedActions = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.shareName = ""; + object.psaRange = ""; + object.storagePool = ""; + object.network = ""; + object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.capacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.capacityGib = options.longs === String ? "0" : 0; + object.exportPolicy = null; + object.unixPermissions = ""; + object.description = ""; + object.snapshotPolicy = null; + object.snapReserve = 0; + object.snapshotDirectory = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.usedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.usedGib = options.longs === String ? "0" : 0; + object.securityStyle = options.enums === String ? "SECURITY_STYLE_UNSPECIFIED" : 0; + object.kerberosEnabled = false; + object.ldapEnabled = false; + object.activeDirectory = ""; + object.restoreParameters = null; + object.kmsConfig = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.hasReplication = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Volume.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Volume.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.shareName != null && message.hasOwnProperty("shareName")) + object.shareName = message.shareName; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + object.psaRange = message.psaRange; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = message.storagePool; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] : message.serviceLevel; + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (typeof message.capacityGib === "number") + object.capacityGib = options.longs === String ? String(message.capacityGib) : message.capacityGib; + else + object.capacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.capacityGib) : options.longs === Number ? new $util.LongBits(message.capacityGib.low >>> 0, message.capacityGib.high >>> 0).toNumber() : message.capacityGib; + if (message.exportPolicy != null && message.hasOwnProperty("exportPolicy")) + object.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.toObject(message.exportPolicy, options); + if (message.protocols && message.protocols.length) { + object.protocols = []; + for (var j = 0; j < message.protocols.length; ++j) + object.protocols[j] = options.enums === String ? $root.google.cloud.netapp.v1.Protocols[message.protocols[j]] === undefined ? message.protocols[j] : $root.google.cloud.netapp.v1.Protocols[message.protocols[j]] : message.protocols[j]; + } + if (message.smbSettings && message.smbSettings.length) { + object.smbSettings = []; + for (var j = 0; j < message.smbSettings.length; ++j) + object.smbSettings[j] = options.enums === String ? $root.google.cloud.netapp.v1.SMBSettings[message.smbSettings[j]] === undefined ? message.smbSettings[j] : $root.google.cloud.netapp.v1.SMBSettings[message.smbSettings[j]] : message.smbSettings[j]; + } + if (message.mountOptions && message.mountOptions.length) { + object.mountOptions = []; + for (var j = 0; j < message.mountOptions.length; ++j) + object.mountOptions[j] = $root.google.cloud.netapp.v1.MountOption.toObject(message.mountOptions[j], options); + } + if (message.unixPermissions != null && message.hasOwnProperty("unixPermissions")) + object.unixPermissions = message.unixPermissions; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.snapshotPolicy != null && message.hasOwnProperty("snapshotPolicy")) + object.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.toObject(message.snapshotPolicy, options); + if (message.snapReserve != null && message.hasOwnProperty("snapReserve")) + object.snapReserve = options.json && !isFinite(message.snapReserve) ? String(message.snapReserve) : message.snapReserve; + if (message.snapshotDirectory != null && message.hasOwnProperty("snapshotDirectory")) + object.snapshotDirectory = message.snapshotDirectory; + if (message.usedGib != null && message.hasOwnProperty("usedGib")) + if (typeof message.usedGib === "number") + object.usedGib = options.longs === String ? String(message.usedGib) : message.usedGib; + else + object.usedGib = options.longs === String ? $util.Long.prototype.toString.call(message.usedGib) : options.longs === Number ? new $util.LongBits(message.usedGib.low >>> 0, message.usedGib.high >>> 0).toNumber() : message.usedGib; + if (message.securityStyle != null && message.hasOwnProperty("securityStyle")) + object.securityStyle = options.enums === String ? $root.google.cloud.netapp.v1.SecurityStyle[message.securityStyle] === undefined ? message.securityStyle : $root.google.cloud.netapp.v1.SecurityStyle[message.securityStyle] : message.securityStyle; + if (message.kerberosEnabled != null && message.hasOwnProperty("kerberosEnabled")) + object.kerberosEnabled = message.kerberosEnabled; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + object.ldapEnabled = message.ldapEnabled; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = message.activeDirectory; + if (message.restoreParameters != null && message.hasOwnProperty("restoreParameters")) + object.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.toObject(message.restoreParameters, options); + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = message.kmsConfig; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + object.encryptionType = options.enums === String ? $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.hasReplication != null && message.hasOwnProperty("hasReplication")) + object.hasReplication = message.hasReplication; + if (message.restrictedActions && message.restrictedActions.length) { + object.restrictedActions = []; + for (var j = 0; j < message.restrictedActions.length; ++j) + object.restrictedActions[j] = options.enums === String ? $root.google.cloud.netapp.v1.RestrictedAction[message.restrictedActions[j]] === undefined ? message.restrictedActions[j] : $root.google.cloud.netapp.v1.RestrictedAction[message.restrictedActions[j]] : message.restrictedActions[j]; + } + return object; + }; + + /** + * Converts this Volume to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Volume + * @instance + * @returns {Object.} JSON object + */ + Volume.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Volume + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Volume.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Volume"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.Volume.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} RESTORING=5 RESTORING value + * @property {number} DISABLED=6 DISABLED value + * @property {number} ERROR=7 ERROR value + */ + Volume.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "RESTORING"] = 5; + values[valuesById[6] = "DISABLED"] = 6; + values[valuesById[7] = "ERROR"] = 7; + return values; + })(); + + return Volume; + })(); + + v1.ExportPolicy = (function() { + + /** + * Properties of an ExportPolicy. + * @memberof google.cloud.netapp.v1 + * @interface IExportPolicy + * @property {Array.|null} [rules] ExportPolicy rules + */ + + /** + * Constructs a new ExportPolicy. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExportPolicy. + * @implements IExportPolicy + * @constructor + * @param {google.cloud.netapp.v1.IExportPolicy=} [properties] Properties to set + */ + function ExportPolicy(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]]; + } + + /** + * ExportPolicy rules. + * @member {Array.} rules + * @memberof google.cloud.netapp.v1.ExportPolicy + * @instance + */ + ExportPolicy.prototype.rules = $util.emptyArray; + + /** + * Creates a new ExportPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.IExportPolicy=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy instance + */ + ExportPolicy.create = function create(properties) { + return new ExportPolicy(properties); + }; + + /** + * Encodes the specified ExportPolicy message. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.IExportPolicy} message ExportPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPolicy.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.cloud.netapp.v1.SimpleExportPolicyRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.IExportPolicy} message ExportPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExportPolicy(); + 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.cloud.netapp.v1.SimpleExportPolicyRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportPolicy message. + * @function verify + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportPolicy.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.cloud.netapp.v1.SimpleExportPolicyRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates an ExportPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy + */ + ExportPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExportPolicy) + return object; + var message = new $root.google.cloud.netapp.v1.ExportPolicy(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.netapp.v1.ExportPolicy.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ExportPolicy.rules: object expected"); + message.rules[i] = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExportPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.ExportPolicy} message ExportPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this ExportPolicy to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExportPolicy + * @instance + * @returns {Object.} JSON object + */ + ExportPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportPolicy + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExportPolicy"; + }; + + return ExportPolicy; + })(); + + v1.SimpleExportPolicyRule = (function() { + + /** + * Properties of a SimpleExportPolicyRule. + * @memberof google.cloud.netapp.v1 + * @interface ISimpleExportPolicyRule + * @property {string|null} [allowedClients] SimpleExportPolicyRule allowedClients + * @property {string|null} [hasRootAccess] SimpleExportPolicyRule hasRootAccess + * @property {google.cloud.netapp.v1.AccessType|null} [accessType] SimpleExportPolicyRule accessType + * @property {boolean|null} [nfsv3] SimpleExportPolicyRule nfsv3 + * @property {boolean|null} [nfsv4] SimpleExportPolicyRule nfsv4 + * @property {boolean|null} [kerberos_5ReadOnly] SimpleExportPolicyRule kerberos_5ReadOnly + * @property {boolean|null} [kerberos_5ReadWrite] SimpleExportPolicyRule kerberos_5ReadWrite + * @property {boolean|null} [kerberos_5iReadOnly] SimpleExportPolicyRule kerberos_5iReadOnly + * @property {boolean|null} [kerberos_5iReadWrite] SimpleExportPolicyRule kerberos_5iReadWrite + * @property {boolean|null} [kerberos_5pReadOnly] SimpleExportPolicyRule kerberos_5pReadOnly + * @property {boolean|null} [kerberos_5pReadWrite] SimpleExportPolicyRule kerberos_5pReadWrite + */ + + /** + * Constructs a new SimpleExportPolicyRule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a SimpleExportPolicyRule. + * @implements ISimpleExportPolicyRule + * @constructor + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule=} [properties] Properties to set + */ + function SimpleExportPolicyRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimpleExportPolicyRule allowedClients. + * @member {string|null|undefined} allowedClients + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.allowedClients = null; + + /** + * SimpleExportPolicyRule hasRootAccess. + * @member {string|null|undefined} hasRootAccess + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.hasRootAccess = null; + + /** + * SimpleExportPolicyRule accessType. + * @member {google.cloud.netapp.v1.AccessType|null|undefined} accessType + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.accessType = null; + + /** + * SimpleExportPolicyRule nfsv3. + * @member {boolean|null|undefined} nfsv3 + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.nfsv3 = null; + + /** + * SimpleExportPolicyRule nfsv4. + * @member {boolean|null|undefined} nfsv4 + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.nfsv4 = null; + + /** + * SimpleExportPolicyRule kerberos_5ReadOnly. + * @member {boolean|null|undefined} kerberos_5ReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5ReadOnly = null; + + /** + * SimpleExportPolicyRule kerberos_5ReadWrite. + * @member {boolean|null|undefined} kerberos_5ReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5ReadWrite = null; + + /** + * SimpleExportPolicyRule kerberos_5iReadOnly. + * @member {boolean|null|undefined} kerberos_5iReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5iReadOnly = null; + + /** + * SimpleExportPolicyRule kerberos_5iReadWrite. + * @member {boolean|null|undefined} kerberos_5iReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5iReadWrite = null; + + /** + * SimpleExportPolicyRule kerberos_5pReadOnly. + * @member {boolean|null|undefined} kerberos_5pReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5pReadOnly = null; + + /** + * SimpleExportPolicyRule kerberos_5pReadWrite. + * @member {boolean|null|undefined} kerberos_5pReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5pReadWrite = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SimpleExportPolicyRule _allowedClients. + * @member {"allowedClients"|undefined} _allowedClients + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_allowedClients", { + get: $util.oneOfGetter($oneOfFields = ["allowedClients"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _hasRootAccess. + * @member {"hasRootAccess"|undefined} _hasRootAccess + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_hasRootAccess", { + get: $util.oneOfGetter($oneOfFields = ["hasRootAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _accessType. + * @member {"accessType"|undefined} _accessType + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_accessType", { + get: $util.oneOfGetter($oneOfFields = ["accessType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _nfsv3. + * @member {"nfsv3"|undefined} _nfsv3 + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_nfsv3", { + get: $util.oneOfGetter($oneOfFields = ["nfsv3"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _nfsv4. + * @member {"nfsv4"|undefined} _nfsv4 + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_nfsv4", { + get: $util.oneOfGetter($oneOfFields = ["nfsv4"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _kerberos_5ReadOnly. + * @member {"kerberos_5ReadOnly"|undefined} _kerberos_5ReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5ReadOnly", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5ReadOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _kerberos_5ReadWrite. + * @member {"kerberos_5ReadWrite"|undefined} _kerberos_5ReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5ReadWrite", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5ReadWrite"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _kerberos_5iReadOnly. + * @member {"kerberos_5iReadOnly"|undefined} _kerberos_5iReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5iReadOnly", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5iReadOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _kerberos_5iReadWrite. + * @member {"kerberos_5iReadWrite"|undefined} _kerberos_5iReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5iReadWrite", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5iReadWrite"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _kerberos_5pReadOnly. + * @member {"kerberos_5pReadOnly"|undefined} _kerberos_5pReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5pReadOnly", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5pReadOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SimpleExportPolicyRule _kerberos_5pReadWrite. + * @member {"kerberos_5pReadWrite"|undefined} _kerberos_5pReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5pReadWrite", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5pReadWrite"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SimpleExportPolicyRule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule instance + */ + SimpleExportPolicyRule.create = function create(properties) { + return new SimpleExportPolicyRule(properties); + }; + + /** + * Encodes the specified SimpleExportPolicyRule message. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule} message SimpleExportPolicyRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleExportPolicyRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedClients != null && Object.hasOwnProperty.call(message, "allowedClients")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedClients); + if (message.hasRootAccess != null && Object.hasOwnProperty.call(message, "hasRootAccess")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hasRootAccess); + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.accessType); + if (message.nfsv3 != null && Object.hasOwnProperty.call(message, "nfsv3")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nfsv3); + if (message.nfsv4 != null && Object.hasOwnProperty.call(message, "nfsv4")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.nfsv4); + if (message.kerberos_5ReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5ReadOnly")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.kerberos_5ReadOnly); + if (message.kerberos_5ReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5ReadWrite")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.kerberos_5ReadWrite); + if (message.kerberos_5iReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5iReadOnly")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.kerberos_5iReadOnly); + if (message.kerberos_5iReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5iReadWrite")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.kerberos_5iReadWrite); + if (message.kerberos_5pReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5pReadOnly")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.kerberos_5pReadOnly); + if (message.kerberos_5pReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5pReadWrite")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.kerberos_5pReadWrite); + return writer; + }; + + /** + * Encodes the specified SimpleExportPolicyRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule} message SimpleExportPolicyRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleExportPolicyRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleExportPolicyRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SimpleExportPolicyRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowedClients = reader.string(); + break; + } + case 2: { + message.hasRootAccess = reader.string(); + break; + } + case 3: { + message.accessType = reader.int32(); + break; + } + case 4: { + message.nfsv3 = reader.bool(); + break; + } + case 5: { + message.nfsv4 = reader.bool(); + break; + } + case 6: { + message.kerberos_5ReadOnly = reader.bool(); + break; + } + case 7: { + message.kerberos_5ReadWrite = reader.bool(); + break; + } + case 8: { + message.kerberos_5iReadOnly = reader.bool(); + break; + } + case 9: { + message.kerberos_5iReadWrite = reader.bool(); + break; + } + case 10: { + message.kerberos_5pReadOnly = reader.bool(); + break; + } + case 11: { + message.kerberos_5pReadWrite = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleExportPolicyRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimpleExportPolicyRule message. + * @function verify + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimpleExportPolicyRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { + properties._allowedClients = 1; + if (!$util.isString(message.allowedClients)) + return "allowedClients: string expected"; + } + if (message.hasRootAccess != null && message.hasOwnProperty("hasRootAccess")) { + properties._hasRootAccess = 1; + if (!$util.isString(message.hasRootAccess)) + return "hasRootAccess: string expected"; + } + if (message.accessType != null && message.hasOwnProperty("accessType")) { + properties._accessType = 1; + switch (message.accessType) { + default: + return "accessType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.nfsv3 != null && message.hasOwnProperty("nfsv3")) { + properties._nfsv3 = 1; + if (typeof message.nfsv3 !== "boolean") + return "nfsv3: boolean expected"; + } + if (message.nfsv4 != null && message.hasOwnProperty("nfsv4")) { + properties._nfsv4 = 1; + if (typeof message.nfsv4 !== "boolean") + return "nfsv4: boolean expected"; + } + if (message.kerberos_5ReadOnly != null && message.hasOwnProperty("kerberos_5ReadOnly")) { + properties._kerberos_5ReadOnly = 1; + if (typeof message.kerberos_5ReadOnly !== "boolean") + return "kerberos_5ReadOnly: boolean expected"; + } + if (message.kerberos_5ReadWrite != null && message.hasOwnProperty("kerberos_5ReadWrite")) { + properties._kerberos_5ReadWrite = 1; + if (typeof message.kerberos_5ReadWrite !== "boolean") + return "kerberos_5ReadWrite: boolean expected"; + } + if (message.kerberos_5iReadOnly != null && message.hasOwnProperty("kerberos_5iReadOnly")) { + properties._kerberos_5iReadOnly = 1; + if (typeof message.kerberos_5iReadOnly !== "boolean") + return "kerberos_5iReadOnly: boolean expected"; + } + if (message.kerberos_5iReadWrite != null && message.hasOwnProperty("kerberos_5iReadWrite")) { + properties._kerberos_5iReadWrite = 1; + if (typeof message.kerberos_5iReadWrite !== "boolean") + return "kerberos_5iReadWrite: boolean expected"; + } + if (message.kerberos_5pReadOnly != null && message.hasOwnProperty("kerberos_5pReadOnly")) { + properties._kerberos_5pReadOnly = 1; + if (typeof message.kerberos_5pReadOnly !== "boolean") + return "kerberos_5pReadOnly: boolean expected"; + } + if (message.kerberos_5pReadWrite != null && message.hasOwnProperty("kerberos_5pReadWrite")) { + properties._kerberos_5pReadWrite = 1; + if (typeof message.kerberos_5pReadWrite !== "boolean") + return "kerberos_5pReadWrite: boolean expected"; + } + return null; + }; + + /** + * Creates a SimpleExportPolicyRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule + */ + SimpleExportPolicyRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.SimpleExportPolicyRule) + return object; + var message = new $root.google.cloud.netapp.v1.SimpleExportPolicyRule(); + if (object.allowedClients != null) + message.allowedClients = String(object.allowedClients); + if (object.hasRootAccess != null) + message.hasRootAccess = String(object.hasRootAccess); + switch (object.accessType) { + default: + if (typeof object.accessType === "number") { + message.accessType = object.accessType; + break; + } + break; + case "ACCESS_TYPE_UNSPECIFIED": + case 0: + message.accessType = 0; + break; + case "READ_ONLY": + case 1: + message.accessType = 1; + break; + case "READ_WRITE": + case 2: + message.accessType = 2; + break; + case "READ_NONE": + case 3: + message.accessType = 3; + break; + } + if (object.nfsv3 != null) + message.nfsv3 = Boolean(object.nfsv3); + if (object.nfsv4 != null) + message.nfsv4 = Boolean(object.nfsv4); + if (object.kerberos_5ReadOnly != null) + message.kerberos_5ReadOnly = Boolean(object.kerberos_5ReadOnly); + if (object.kerberos_5ReadWrite != null) + message.kerberos_5ReadWrite = Boolean(object.kerberos_5ReadWrite); + if (object.kerberos_5iReadOnly != null) + message.kerberos_5iReadOnly = Boolean(object.kerberos_5iReadOnly); + if (object.kerberos_5iReadWrite != null) + message.kerberos_5iReadWrite = Boolean(object.kerberos_5iReadWrite); + if (object.kerberos_5pReadOnly != null) + message.kerberos_5pReadOnly = Boolean(object.kerberos_5pReadOnly); + if (object.kerberos_5pReadWrite != null) + message.kerberos_5pReadWrite = Boolean(object.kerberos_5pReadWrite); + return message; + }; + + /** + * Creates a plain object from a SimpleExportPolicyRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.SimpleExportPolicyRule} message SimpleExportPolicyRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimpleExportPolicyRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { + object.allowedClients = message.allowedClients; + if (options.oneofs) + object._allowedClients = "allowedClients"; + } + if (message.hasRootAccess != null && message.hasOwnProperty("hasRootAccess")) { + object.hasRootAccess = message.hasRootAccess; + if (options.oneofs) + object._hasRootAccess = "hasRootAccess"; + } + if (message.accessType != null && message.hasOwnProperty("accessType")) { + object.accessType = options.enums === String ? $root.google.cloud.netapp.v1.AccessType[message.accessType] === undefined ? message.accessType : $root.google.cloud.netapp.v1.AccessType[message.accessType] : message.accessType; + if (options.oneofs) + object._accessType = "accessType"; + } + if (message.nfsv3 != null && message.hasOwnProperty("nfsv3")) { + object.nfsv3 = message.nfsv3; + if (options.oneofs) + object._nfsv3 = "nfsv3"; + } + if (message.nfsv4 != null && message.hasOwnProperty("nfsv4")) { + object.nfsv4 = message.nfsv4; + if (options.oneofs) + object._nfsv4 = "nfsv4"; + } + if (message.kerberos_5ReadOnly != null && message.hasOwnProperty("kerberos_5ReadOnly")) { + object.kerberos_5ReadOnly = message.kerberos_5ReadOnly; + if (options.oneofs) + object._kerberos_5ReadOnly = "kerberos_5ReadOnly"; + } + if (message.kerberos_5ReadWrite != null && message.hasOwnProperty("kerberos_5ReadWrite")) { + object.kerberos_5ReadWrite = message.kerberos_5ReadWrite; + if (options.oneofs) + object._kerberos_5ReadWrite = "kerberos_5ReadWrite"; + } + if (message.kerberos_5iReadOnly != null && message.hasOwnProperty("kerberos_5iReadOnly")) { + object.kerberos_5iReadOnly = message.kerberos_5iReadOnly; + if (options.oneofs) + object._kerberos_5iReadOnly = "kerberos_5iReadOnly"; + } + if (message.kerberos_5iReadWrite != null && message.hasOwnProperty("kerberos_5iReadWrite")) { + object.kerberos_5iReadWrite = message.kerberos_5iReadWrite; + if (options.oneofs) + object._kerberos_5iReadWrite = "kerberos_5iReadWrite"; + } + if (message.kerberos_5pReadOnly != null && message.hasOwnProperty("kerberos_5pReadOnly")) { + object.kerberos_5pReadOnly = message.kerberos_5pReadOnly; + if (options.oneofs) + object._kerberos_5pReadOnly = "kerberos_5pReadOnly"; + } + if (message.kerberos_5pReadWrite != null && message.hasOwnProperty("kerberos_5pReadWrite")) { + object.kerberos_5pReadWrite = message.kerberos_5pReadWrite; + if (options.oneofs) + object._kerberos_5pReadWrite = "kerberos_5pReadWrite"; + } + return object; + }; + + /** + * Converts this SimpleExportPolicyRule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + * @returns {Object.} JSON object + */ + SimpleExportPolicyRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimpleExportPolicyRule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimpleExportPolicyRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.SimpleExportPolicyRule"; + }; + + return SimpleExportPolicyRule; + })(); + + v1.SnapshotPolicy = (function() { + + /** + * Properties of a SnapshotPolicy. + * @memberof google.cloud.netapp.v1 + * @interface ISnapshotPolicy + * @property {boolean|null} [enabled] SnapshotPolicy enabled + * @property {google.cloud.netapp.v1.IHourlySchedule|null} [hourlySchedule] SnapshotPolicy hourlySchedule + * @property {google.cloud.netapp.v1.IDailySchedule|null} [dailySchedule] SnapshotPolicy dailySchedule + * @property {google.cloud.netapp.v1.IWeeklySchedule|null} [weeklySchedule] SnapshotPolicy weeklySchedule + * @property {google.cloud.netapp.v1.IMonthlySchedule|null} [monthlySchedule] SnapshotPolicy monthlySchedule + */ + + /** + * Constructs a new SnapshotPolicy. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a SnapshotPolicy. + * @implements ISnapshotPolicy + * @constructor + * @param {google.cloud.netapp.v1.ISnapshotPolicy=} [properties] Properties to set + */ + function SnapshotPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SnapshotPolicy enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.enabled = null; + + /** + * SnapshotPolicy hourlySchedule. + * @member {google.cloud.netapp.v1.IHourlySchedule|null|undefined} hourlySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.hourlySchedule = null; + + /** + * SnapshotPolicy dailySchedule. + * @member {google.cloud.netapp.v1.IDailySchedule|null|undefined} dailySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.dailySchedule = null; + + /** + * SnapshotPolicy weeklySchedule. + * @member {google.cloud.netapp.v1.IWeeklySchedule|null|undefined} weeklySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.weeklySchedule = null; + + /** + * SnapshotPolicy monthlySchedule. + * @member {google.cloud.netapp.v1.IMonthlySchedule|null|undefined} monthlySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.monthlySchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SnapshotPolicy _enabled. + * @member {"enabled"|undefined} _enabled + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + Object.defineProperty(SnapshotPolicy.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SnapshotPolicy _hourlySchedule. + * @member {"hourlySchedule"|undefined} _hourlySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + Object.defineProperty(SnapshotPolicy.prototype, "_hourlySchedule", { + get: $util.oneOfGetter($oneOfFields = ["hourlySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SnapshotPolicy _dailySchedule. + * @member {"dailySchedule"|undefined} _dailySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + Object.defineProperty(SnapshotPolicy.prototype, "_dailySchedule", { + get: $util.oneOfGetter($oneOfFields = ["dailySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SnapshotPolicy _weeklySchedule. + * @member {"weeklySchedule"|undefined} _weeklySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + Object.defineProperty(SnapshotPolicy.prototype, "_weeklySchedule", { + get: $util.oneOfGetter($oneOfFields = ["weeklySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SnapshotPolicy _monthlySchedule. + * @member {"monthlySchedule"|undefined} _monthlySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + Object.defineProperty(SnapshotPolicy.prototype, "_monthlySchedule", { + get: $util.oneOfGetter($oneOfFields = ["monthlySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SnapshotPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.ISnapshotPolicy=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy instance + */ + SnapshotPolicy.create = function create(properties) { + return new SnapshotPolicy(properties); + }; + + /** + * Encodes the specified SnapshotPolicy message. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.ISnapshotPolicy} message SnapshotPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.hourlySchedule != null && Object.hasOwnProperty.call(message, "hourlySchedule")) + $root.google.cloud.netapp.v1.HourlySchedule.encode(message.hourlySchedule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dailySchedule != null && Object.hasOwnProperty.call(message, "dailySchedule")) + $root.google.cloud.netapp.v1.DailySchedule.encode(message.dailySchedule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.weeklySchedule != null && Object.hasOwnProperty.call(message, "weeklySchedule")) + $root.google.cloud.netapp.v1.WeeklySchedule.encode(message.weeklySchedule, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.monthlySchedule != null && Object.hasOwnProperty.call(message, "monthlySchedule")) + $root.google.cloud.netapp.v1.MonthlySchedule.encode(message.monthlySchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SnapshotPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.ISnapshotPolicy} message SnapshotPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SnapshotPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.decode(reader, reader.uint32()); + break; + } + case 4: { + message.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.decode(reader, reader.uint32()); + break; + } + case 5: { + message.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnapshotPolicy message. + * @function verify + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnapshotPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + if (message.hourlySchedule != null && message.hasOwnProperty("hourlySchedule")) { + properties._hourlySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.HourlySchedule.verify(message.hourlySchedule); + if (error) + return "hourlySchedule." + error; + } + } + if (message.dailySchedule != null && message.hasOwnProperty("dailySchedule")) { + properties._dailySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.DailySchedule.verify(message.dailySchedule); + if (error) + return "dailySchedule." + error; + } + } + if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { + properties._weeklySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.WeeklySchedule.verify(message.weeklySchedule); + if (error) + return "weeklySchedule." + error; + } + } + if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { + properties._monthlySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.MonthlySchedule.verify(message.monthlySchedule); + if (error) + return "monthlySchedule." + error; + } + } + return null; + }; + + /** + * Creates a SnapshotPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy + */ + SnapshotPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.SnapshotPolicy) + return object; + var message = new $root.google.cloud.netapp.v1.SnapshotPolicy(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.hourlySchedule != null) { + if (typeof object.hourlySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.hourlySchedule: object expected"); + message.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.fromObject(object.hourlySchedule); + } + if (object.dailySchedule != null) { + if (typeof object.dailySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.dailySchedule: object expected"); + message.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.fromObject(object.dailySchedule); + } + if (object.weeklySchedule != null) { + if (typeof object.weeklySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.weeklySchedule: object expected"); + message.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.fromObject(object.weeklySchedule); + } + if (object.monthlySchedule != null) { + if (typeof object.monthlySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.monthlySchedule: object expected"); + message.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.fromObject(object.monthlySchedule); + } + return message; + }; + + /** + * Creates a plain object from a SnapshotPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.SnapshotPolicy} message SnapshotPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnapshotPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + if (message.hourlySchedule != null && message.hasOwnProperty("hourlySchedule")) { + object.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.toObject(message.hourlySchedule, options); + if (options.oneofs) + object._hourlySchedule = "hourlySchedule"; + } + if (message.dailySchedule != null && message.hasOwnProperty("dailySchedule")) { + object.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.toObject(message.dailySchedule, options); + if (options.oneofs) + object._dailySchedule = "dailySchedule"; + } + if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { + object.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.toObject(message.weeklySchedule, options); + if (options.oneofs) + object._weeklySchedule = "weeklySchedule"; + } + if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { + object.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.toObject(message.monthlySchedule, options); + if (options.oneofs) + object._monthlySchedule = "monthlySchedule"; + } + return object; + }; + + /** + * Converts this SnapshotPolicy to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + * @returns {Object.} JSON object + */ + SnapshotPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SnapshotPolicy + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SnapshotPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.SnapshotPolicy"; + }; + + return SnapshotPolicy; + })(); + + v1.HourlySchedule = (function() { + + /** + * Properties of an HourlySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IHourlySchedule + * @property {number|null} [snapshotsToKeep] HourlySchedule snapshotsToKeep + * @property {number|null} [minute] HourlySchedule minute + */ + + /** + * Constructs a new HourlySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an HourlySchedule. + * @implements IHourlySchedule + * @constructor + * @param {google.cloud.netapp.v1.IHourlySchedule=} [properties] Properties to set + */ + function HourlySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HourlySchedule snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + */ + HourlySchedule.prototype.snapshotsToKeep = null; + + /** + * HourlySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + */ + HourlySchedule.prototype.minute = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HourlySchedule _snapshotsToKeep. + * @member {"snapshotsToKeep"|undefined} _snapshotsToKeep + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + */ + Object.defineProperty(HourlySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * HourlySchedule _minute. + * @member {"minute"|undefined} _minute + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + */ + Object.defineProperty(HourlySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HourlySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.IHourlySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule instance + */ + HourlySchedule.create = function create(properties) { + return new HourlySchedule(properties); + }; + + /** + * Encodes the specified HourlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.IHourlySchedule} message HourlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HourlySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + return writer; + }; + + /** + * Encodes the specified HourlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.IHourlySchedule} message HourlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HourlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HourlySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HourlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HourlySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an HourlySchedule message. + * @function verify + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HourlySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + return null; + }; + + /** + * Creates an HourlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule + */ + HourlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.HourlySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.HourlySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + return message; + }; + + /** + * Creates a plain object from an HourlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.HourlySchedule} message HourlySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HourlySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + return object; + }; + + /** + * Converts this HourlySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + * @returns {Object.} JSON object + */ + HourlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HourlySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HourlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.HourlySchedule"; + }; + + return HourlySchedule; + })(); + + v1.DailySchedule = (function() { + + /** + * Properties of a DailySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IDailySchedule + * @property {number|null} [snapshotsToKeep] DailySchedule snapshotsToKeep + * @property {number|null} [minute] DailySchedule minute + * @property {number|null} [hour] DailySchedule hour + */ + + /** + * Constructs a new DailySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DailySchedule. + * @implements IDailySchedule + * @constructor + * @param {google.cloud.netapp.v1.IDailySchedule=} [properties] Properties to set + */ + function DailySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DailySchedule snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + DailySchedule.prototype.snapshotsToKeep = null; + + /** + * DailySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + DailySchedule.prototype.minute = null; + + /** + * DailySchedule hour. + * @member {number|null|undefined} hour + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + DailySchedule.prototype.hour = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DailySchedule _snapshotsToKeep. + * @member {"snapshotsToKeep"|undefined} _snapshotsToKeep + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + Object.defineProperty(DailySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DailySchedule _minute. + * @member {"minute"|undefined} _minute + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + Object.defineProperty(DailySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DailySchedule _hour. + * @member {"hour"|undefined} _hour + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + Object.defineProperty(DailySchedule.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DailySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.IDailySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule instance + */ + DailySchedule.create = function create(properties) { + return new DailySchedule(properties); + }; + + /** + * Encodes the specified DailySchedule message. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.IDailySchedule} message DailySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); + return writer; + }; + + /** + * Encodes the specified DailySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.IDailySchedule} message DailySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DailySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailySchedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DailySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + case 3: { + message.hour = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DailySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DailySchedule message. + * @function verify + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DailySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (typeof message.hour !== "number") + return "hour: number expected"; + } + return null; + }; + + /** + * Creates a DailySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule + */ + DailySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DailySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.DailySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + if (object.hour != null) + message.hour = Number(object.hour); + return message; + }; + + /** + * Creates a plain object from a DailySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.DailySchedule} message DailySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DailySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; + if (options.oneofs) + object._hour = "hour"; + } + return object; + }; + + /** + * Converts this DailySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + * @returns {Object.} JSON object + */ + DailySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DailySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DailySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DailySchedule"; + }; + + return DailySchedule; + })(); + + v1.WeeklySchedule = (function() { + + /** + * Properties of a WeeklySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IWeeklySchedule + * @property {number|null} [snapshotsToKeep] WeeklySchedule snapshotsToKeep + * @property {number|null} [minute] WeeklySchedule minute + * @property {number|null} [hour] WeeklySchedule hour + * @property {string|null} [day] WeeklySchedule day + */ + + /** + * Constructs a new WeeklySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a WeeklySchedule. + * @implements IWeeklySchedule + * @constructor + * @param {google.cloud.netapp.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 snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.snapshotsToKeep = null; + + /** + * WeeklySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.minute = null; + + /** + * WeeklySchedule hour. + * @member {number|null|undefined} hour + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.hour = null; + + /** + * WeeklySchedule day. + * @member {string|null|undefined} day + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.day = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WeeklySchedule _snapshotsToKeep. + * @member {"snapshotsToKeep"|undefined} _snapshotsToKeep + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + Object.defineProperty(WeeklySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * WeeklySchedule _minute. + * @member {"minute"|undefined} _minute + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + Object.defineProperty(WeeklySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * WeeklySchedule _hour. + * @member {"hour"|undefined} _hour + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + Object.defineProperty(WeeklySchedule.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * WeeklySchedule _day. + * @member {"day"|undefined} _day + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + Object.defineProperty(WeeklySchedule.prototype, "_day", { + get: $util.oneOfGetter($oneOfFields = ["day"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.v1.IWeeklySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule instance + */ + WeeklySchedule.create = function create(properties) { + return new WeeklySchedule(properties); + }; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.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.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.day); + return writer; + }; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.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.netapp.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.netapp.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.netapp.v1.WeeklySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + case 3: { + message.hour = reader.double(); + break; + } + case 4: { + message.day = reader.string(); + 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.netapp.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.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.netapp.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"; + var properties = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (typeof message.hour !== "number") + return "hour: number expected"; + } + if (message.day != null && message.hasOwnProperty("day")) { + properties._day = 1; + if (!$util.isString(message.day)) + return "day: string expected"; + } + return null; + }; + + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule + */ + WeeklySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.WeeklySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.WeeklySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + if (object.hour != null) + message.hour = Number(object.hour); + if (object.day != null) + message.day = String(object.day); + return message; + }; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.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 (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; + if (options.oneofs) + object._hour = "hour"; + } + if (message.day != null && message.hasOwnProperty("day")) { + object.day = message.day; + if (options.oneofs) + object._day = "day"; + } + return object; + }; + + /** + * Converts this WeeklySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + * @returns {Object.} JSON object + */ + WeeklySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeeklySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.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.netapp.v1.WeeklySchedule"; + }; + + return WeeklySchedule; + })(); + + v1.MonthlySchedule = (function() { + + /** + * Properties of a MonthlySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IMonthlySchedule + * @property {number|null} [snapshotsToKeep] MonthlySchedule snapshotsToKeep + * @property {number|null} [minute] MonthlySchedule minute + * @property {number|null} [hour] MonthlySchedule hour + * @property {string|null} [daysOfMonth] MonthlySchedule daysOfMonth + */ + + /** + * Constructs a new MonthlySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a MonthlySchedule. + * @implements IMonthlySchedule + * @constructor + * @param {google.cloud.netapp.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 snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.snapshotsToKeep = null; + + /** + * MonthlySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.minute = null; + + /** + * MonthlySchedule hour. + * @member {number|null|undefined} hour + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.hour = null; + + /** + * MonthlySchedule daysOfMonth. + * @member {string|null|undefined} daysOfMonth + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.daysOfMonth = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MonthlySchedule _snapshotsToKeep. + * @member {"snapshotsToKeep"|undefined} _snapshotsToKeep + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + Object.defineProperty(MonthlySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * MonthlySchedule _minute. + * @member {"minute"|undefined} _minute + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + Object.defineProperty(MonthlySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * MonthlySchedule _hour. + * @member {"hour"|undefined} _hour + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + Object.defineProperty(MonthlySchedule.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * MonthlySchedule _daysOfMonth. + * @member {"daysOfMonth"|undefined} _daysOfMonth + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + Object.defineProperty(MonthlySchedule.prototype, "_daysOfMonth", { + get: $util.oneOfGetter($oneOfFields = ["daysOfMonth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.v1.IMonthlySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule instance + */ + MonthlySchedule.create = function create(properties) { + return new MonthlySchedule(properties); + }; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.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.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); + if (message.daysOfMonth != null && Object.hasOwnProperty.call(message, "daysOfMonth")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.daysOfMonth); + return writer; + }; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.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.netapp.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.netapp.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.netapp.v1.MonthlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + case 3: { + message.hour = reader.double(); + break; + } + case 4: { + message.daysOfMonth = reader.string(); + 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.netapp.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.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.netapp.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.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (typeof message.hour !== "number") + return "hour: number expected"; + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + properties._daysOfMonth = 1; + if (!$util.isString(message.daysOfMonth)) + return "daysOfMonth: string expected"; + } + return null; + }; + + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule + */ + MonthlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.MonthlySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.MonthlySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + if (object.hour != null) + message.hour = Number(object.hour); + if (object.daysOfMonth != null) + message.daysOfMonth = String(object.daysOfMonth); + return message; + }; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.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.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; + if (options.oneofs) + object._hour = "hour"; + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + object.daysOfMonth = message.daysOfMonth; + if (options.oneofs) + object._daysOfMonth = "daysOfMonth"; + } + return object; + }; + + /** + * Converts this MonthlySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + * @returns {Object.} JSON object + */ + MonthlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonthlySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.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.netapp.v1.MonthlySchedule"; + }; + + return MonthlySchedule; + })(); + + v1.MountOption = (function() { + + /** + * Properties of a MountOption. + * @memberof google.cloud.netapp.v1 + * @interface IMountOption + * @property {string|null} ["export"] MountOption export + * @property {string|null} [exportFull] MountOption exportFull + * @property {google.cloud.netapp.v1.Protocols|null} [protocol] MountOption protocol + * @property {string|null} [instructions] MountOption instructions + */ + + /** + * Constructs a new MountOption. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a MountOption. + * @implements IMountOption + * @constructor + * @param {google.cloud.netapp.v1.IMountOption=} [properties] Properties to set + */ + function MountOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MountOption export. + * @member {string} export + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype["export"] = ""; + + /** + * MountOption exportFull. + * @member {string} exportFull + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype.exportFull = ""; + + /** + * MountOption protocol. + * @member {google.cloud.netapp.v1.Protocols} protocol + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype.protocol = 0; + + /** + * MountOption instructions. + * @member {string} instructions + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype.instructions = ""; + + /** + * Creates a new MountOption instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.IMountOption=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.MountOption} MountOption instance + */ + MountOption.create = function create(properties) { + return new MountOption(properties); + }; + + /** + * Encodes the specified MountOption message. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.IMountOption} message MountOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MountOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["export"] != null && Object.hasOwnProperty.call(message, "export")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message["export"]); + if (message.exportFull != null && Object.hasOwnProperty.call(message, "exportFull")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exportFull); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.protocol); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instructions); + return writer; + }; + + /** + * Encodes the specified MountOption message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.IMountOption} message MountOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MountOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MountOption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.MountOption} MountOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MountOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.MountOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message["export"] = reader.string(); + break; + } + case 2: { + message.exportFull = reader.string(); + break; + } + case 3: { + message.protocol = reader.int32(); + break; + } + case 4: { + message.instructions = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MountOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.MountOption} MountOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MountOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MountOption message. + * @function verify + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MountOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["export"] != null && message.hasOwnProperty("export")) + if (!$util.isString(message["export"])) + return "export: string expected"; + if (message.exportFull != null && message.hasOwnProperty("exportFull")) + if (!$util.isString(message.exportFull)) + return "exportFull: string expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + switch (message.protocol) { + default: + return "protocol: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + return null; + }; + + /** + * Creates a MountOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.MountOption} MountOption + */ + MountOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.MountOption) + return object; + var message = new $root.google.cloud.netapp.v1.MountOption(); + if (object["export"] != null) + message["export"] = String(object["export"]); + if (object.exportFull != null) + message.exportFull = String(object.exportFull); + switch (object.protocol) { + default: + if (typeof object.protocol === "number") { + message.protocol = object.protocol; + break; + } + break; + case "PROTOCOLS_UNSPECIFIED": + case 0: + message.protocol = 0; + break; + case "NFSV3": + case 1: + message.protocol = 1; + break; + case "NFSV4": + case 2: + message.protocol = 2; + break; + case "SMB": + case 3: + message.protocol = 3; + break; + } + if (object.instructions != null) + message.instructions = String(object.instructions); + return message; + }; + + /** + * Creates a plain object from a MountOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.MountOption} message MountOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MountOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["export"] = ""; + object.exportFull = ""; + object.protocol = options.enums === String ? "PROTOCOLS_UNSPECIFIED" : 0; + object.instructions = ""; + } + if (message["export"] != null && message.hasOwnProperty("export")) + object["export"] = message["export"]; + if (message.exportFull != null && message.hasOwnProperty("exportFull")) + object.exportFull = message.exportFull; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = options.enums === String ? $root.google.cloud.netapp.v1.Protocols[message.protocol] === undefined ? message.protocol : $root.google.cloud.netapp.v1.Protocols[message.protocol] : message.protocol; + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + return object; + }; + + /** + * Converts this MountOption to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.MountOption + * @instance + * @returns {Object.} JSON object + */ + MountOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MountOption + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MountOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.MountOption"; + }; + + return MountOption; + })(); + + v1.RestoreParameters = (function() { + + /** + * Properties of a RestoreParameters. + * @memberof google.cloud.netapp.v1 + * @interface IRestoreParameters + * @property {string|null} [sourceSnapshot] RestoreParameters sourceSnapshot + */ + + /** + * Constructs a new RestoreParameters. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a RestoreParameters. + * @implements IRestoreParameters + * @constructor + * @param {google.cloud.netapp.v1.IRestoreParameters=} [properties] Properties to set + */ + function RestoreParameters(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreParameters sourceSnapshot. + * @member {string|null|undefined} sourceSnapshot + * @memberof google.cloud.netapp.v1.RestoreParameters + * @instance + */ + RestoreParameters.prototype.sourceSnapshot = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreParameters source. + * @member {"sourceSnapshot"|undefined} source + * @memberof google.cloud.netapp.v1.RestoreParameters + * @instance + */ + Object.defineProperty(RestoreParameters.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["sourceSnapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreParameters instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.IRestoreParameters=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters instance + */ + RestoreParameters.create = function create(properties) { + return new RestoreParameters(properties); + }; + + /** + * Encodes the specified RestoreParameters message. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.IRestoreParameters} message RestoreParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreParameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceSnapshot); + return writer; + }; + + /** + * Encodes the specified RestoreParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.IRestoreParameters} message RestoreParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreParameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreParameters.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RestoreParameters(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceSnapshot = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreParameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreParameters message. + * @function verify + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreParameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { + properties.source = 1; + if (!$util.isString(message.sourceSnapshot)) + return "sourceSnapshot: string expected"; + } + return null; + }; + + /** + * Creates a RestoreParameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters + */ + RestoreParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.RestoreParameters) + return object; + var message = new $root.google.cloud.netapp.v1.RestoreParameters(); + if (object.sourceSnapshot != null) + message.sourceSnapshot = String(object.sourceSnapshot); + return message; + }; + + /** + * Creates a plain object from a RestoreParameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.RestoreParameters} message RestoreParameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreParameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { + object.sourceSnapshot = message.sourceSnapshot; + if (options.oneofs) + object.source = "sourceSnapshot"; + } + return object; + }; + + /** + * Converts this RestoreParameters to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.RestoreParameters + * @instance + * @returns {Object.} JSON object + */ + RestoreParameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreParameters + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.RestoreParameters"; + }; + + return RestoreParameters; + })(); + + return v1; + })(); + + return netapp; + })(); + + 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 + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + 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); + }; + + /** + * 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; + })(); + + 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); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + 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); + }; + + /** + * 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; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + 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; + } + case 13: { + message.edition = 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"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: 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); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * 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); + }; + + /** + * 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; + })(); + + 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) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + 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) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_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); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.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); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.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 11: { + message.deprecatedLegacyJsonFieldConflicts = 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {google.protobuf.FieldOptions.OptionTargetType|null} [target] FieldOptions target + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * 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 unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions target. + * @member {google.protobuf.FieldOptions.OptionTargetType} target + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.target = 0; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.target); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + 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 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 18: { + message.target = 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 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_TYPE_UNKNOWN": + case 0: + message.target = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.target = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.target = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.target = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.target = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.target = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.target = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.target = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.target = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.target = 9; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.target = options.enums === String ? "TARGET_TYPE_UNKNOWN" : 0; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.target] === undefined ? message.target : $root.google.protobuf.FieldOptions.OptionTargetType[message.target] : message.target; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + 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); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.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 6: { + message.deprecatedLegacyJsonFieldConflicts = 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {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); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {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); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.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] === 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) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + 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 >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.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); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + 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); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + 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; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.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); + }; + + /** + * 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; + })(); + + 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); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * 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); + }; + + /** + * 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; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-netapp/protos/protos.json b/packages/google-cloud-netapp/protos/protos.json new file mode 100644 index 000000000000..a37fd011711a --- /dev/null +++ b/packages/google-cloud-netapp/protos/protos.json @@ -0,0 +1,4904 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "netapp": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.NetApp.V1", + "go_package": "cloud.google.com/go/netapp/apiv1/netapppb;netapppb", + "java_multiple_files": true, + "java_outer_classname": "VolumeProto", + "java_package": "com.google.cloud.netapp.v1", + "php_namespace": "Google\\Cloud\\NetApp\\V1", + "ruby_package": "Google::Cloud::NetApp::V1", + "(google.api.resource_definition).type": "compute.googleapis.com/Network", + "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" + }, + "nested": { + "ListActiveDirectoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListActiveDirectoriesResponse": { + "fields": { + "activeDirectories": { + "rule": "repeated", + "type": "ActiveDirectory", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetActiveDirectoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + } + } + }, + "CreateActiveDirectoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "activeDirectory": { + "type": "ActiveDirectory", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeDirectoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateActiveDirectoryRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeDirectory": { + "type": "ActiveDirectory", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteActiveDirectoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + } + } + }, + "ActiveDirectory": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/ActiveDirectory", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/activeDirectories/{active_directory}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "domain": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "site": { + "type": "string", + "id": 5 + }, + "dns": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "netBiosPrefix": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "organizationalUnit": { + "type": "string", + "id": 8 + }, + "aesEncryption": { + "type": "bool", + "id": 9 + }, + "username": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "password": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupOperators": { + "rule": "repeated", + "type": "string", + "id": 12 + }, + "securityOperators": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "kdcHostname": { + "type": "string", + "id": 14 + }, + "kdcIp": { + "type": "string", + "id": 15 + }, + "nfsUsersWithLdap": { + "type": "bool", + "id": 16 + }, + "description": { + "type": "string", + "id": 17 + }, + "ldapSigning": { + "type": "bool", + "id": 18 + }, + "encryptDcConnections": { + "type": "bool", + "id": 19 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 20 + }, + "stateDetails": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "IN_USE": 4, + "DELETING": 5, + "ERROR": 6 + } + } + } + }, + "NetApp": { + "options": { + "(google.api.default_host)": "netapp.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListStoragePools": { + "requestType": "ListStoragePoolsRequest", + "responseType": "ListStoragePoolsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/storagePools", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/storagePools" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateStoragePool": { + "requestType": "CreateStoragePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/storagePools", + "(google.api.http).body": "storage_pool", + "(google.api.method_signature)": "parent,storage_pool,storage_pool_id", + "(google.longrunning.operation_info).response_type": "StoragePool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/storagePools", + "body": "storage_pool" + } + }, + { + "(google.api.method_signature)": "parent,storage_pool,storage_pool_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "StoragePool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetStoragePool": { + "requestType": "GetStoragePoolRequest", + "responseType": "StoragePool", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/storagePools/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/storagePools/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateStoragePool": { + "requestType": "UpdateStoragePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}", + "(google.api.http).body": "storage_pool", + "(google.api.method_signature)": "storage_pool,update_mask", + "(google.longrunning.operation_info).response_type": "StoragePool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}", + "body": "storage_pool" + } + }, + { + "(google.api.method_signature)": "storage_pool,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "StoragePool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteStoragePool": { + "requestType": "DeleteStoragePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/storagePools/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/storagePools/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListVolumes": { + "requestType": "ListVolumesRequest", + "responseType": "ListVolumesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/volumes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/volumes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVolume": { + "requestType": "GetVolumeRequest", + "responseType": "Volume", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/volumes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateVolume": { + "requestType": "CreateVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/volumes", + "(google.api.http).body": "volume", + "(google.api.method_signature)": "parent,volume,volume_id", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/volumes", + "body": "volume" + } + }, + { + "(google.api.method_signature)": "parent,volume,volume_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateVolume": { + "requestType": "UpdateVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{volume.name=projects/*/locations/*/volumes/*}", + "(google.api.http).body": "volume", + "(google.api.method_signature)": "volume,update_mask", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{volume.name=projects/*/locations/*/volumes/*}", + "body": "volume" + } + }, + { + "(google.api.method_signature)": "volume,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteVolume": { + "requestType": "DeleteVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/volumes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RevertVolume": { + "requestType": "RevertVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:revert", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*}:revert", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListSnapshots": { + "requestType": "ListSnapshotsRequest", + "responseType": "ListSnapshotsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetSnapshot": { + "requestType": "GetSnapshotRequest", + "responseType": "Snapshot", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateSnapshot": { + "requestType": "CreateSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", + "(google.api.http).body": "snapshot", + "(google.api.method_signature)": "parent,snapshot,snapshot_id", + "(google.longrunning.operation_info).response_type": "Snapshot", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", + "body": "snapshot" + } + }, + { + "(google.api.method_signature)": "parent,snapshot,snapshot_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Snapshot", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteSnapshot": { + "requestType": "DeleteSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateSnapshot": { + "requestType": "UpdateSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}", + "(google.api.http).body": "snapshot", + "(google.api.method_signature)": "snapshot,update_mask", + "(google.longrunning.operation_info).response_type": "Snapshot", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}", + "body": "snapshot" + } + }, + { + "(google.api.method_signature)": "snapshot,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Snapshot", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListActiveDirectories": { + "requestType": "ListActiveDirectoriesRequest", + "responseType": "ListActiveDirectoriesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/activeDirectories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/activeDirectories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetActiveDirectory": { + "requestType": "GetActiveDirectoryRequest", + "responseType": "ActiveDirectory", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/activeDirectories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/activeDirectories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateActiveDirectory": { + "requestType": "CreateActiveDirectoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/activeDirectories", + "(google.api.http).body": "active_directory", + "(google.api.method_signature)": "parent,active_directory,active_directory_id", + "(google.longrunning.operation_info).response_type": "ActiveDirectory", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/activeDirectories", + "body": "active_directory" + } + }, + { + "(google.api.method_signature)": "parent,active_directory,active_directory_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ActiveDirectory", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateActiveDirectory": { + "requestType": "UpdateActiveDirectoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}", + "(google.api.http).body": "active_directory", + "(google.api.method_signature)": "active_directory,update_mask", + "(google.longrunning.operation_info).response_type": "ActiveDirectory", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}", + "body": "active_directory" + } + }, + { + "(google.api.method_signature)": "active_directory,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ActiveDirectory", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteActiveDirectory": { + "requestType": "DeleteActiveDirectoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/activeDirectories/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/activeDirectories/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListKmsConfigs": { + "requestType": "ListKmsConfigsRequest", + "responseType": "ListKmsConfigsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/kmsConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/kmsConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateKmsConfig": { + "requestType": "CreateKmsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/kmsConfigs", + "(google.api.http).body": "kms_config", + "(google.api.method_signature)": "parent,kms_config,kms_config_id", + "(google.longrunning.operation_info).response_type": "KmsConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/kmsConfigs", + "body": "kms_config" + } + }, + { + "(google.api.method_signature)": "parent,kms_config,kms_config_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "KmsConfig", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetKmsConfig": { + "requestType": "GetKmsConfigRequest", + "responseType": "KmsConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/kmsConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateKmsConfig": { + "requestType": "UpdateKmsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}", + "(google.api.http).body": "kms_config", + "(google.api.method_signature)": "kms_config,update_mask", + "(google.longrunning.operation_info).response_type": "KmsConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}", + "body": "kms_config" + } + }, + { + "(google.api.method_signature)": "kms_config,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "KmsConfig", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "EncryptVolumes": { + "requestType": "EncryptVolumesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "KmsConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "KmsConfig", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "VerifyKmsConfig": { + "requestType": "VerifyKmsConfigRequest", + "responseType": "VerifyKmsConfigResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify", + "body": "*" + } + } + ] + }, + "DeleteKmsConfig": { + "requestType": "DeleteKmsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/kmsConfigs/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListReplications": { + "requestType": "ListReplicationsRequest", + "responseType": "ListReplicationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetReplication": { + "requestType": "GetReplicationRequest", + "responseType": "Replication", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateReplication": { + "requestType": "CreateReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", + "(google.api.http).body": "replication", + "(google.api.method_signature)": "parent,replication,replication_id", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", + "body": "replication" + } + }, + { + "(google.api.method_signature)": "parent,replication,replication_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteReplication": { + "requestType": "DeleteReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateReplication": { + "requestType": "UpdateReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}", + "(google.api.http).body": "replication", + "(google.api.method_signature)": "replication,update_mask", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}", + "body": "replication" + } + }, + { + "(google.api.method_signature)": "replication,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "StopReplication": { + "requestType": "StopReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ResumeReplication": { + "requestType": "ResumeReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ReverseReplicationDirection": { + "requestType": "ReverseReplicationDirectionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetKmsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "ListKmsConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/KmsConfig" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListKmsConfigsResponse": { + "fields": { + "kmsConfigs": { + "rule": "repeated", + "type": "KmsConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateKmsConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/KmsConfig" + } + }, + "kmsConfigId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "kmsConfig": { + "type": "KmsConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateKmsConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "kmsConfig": { + "type": "KmsConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteKmsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "EncryptVolumesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "VerifyKmsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "VerifyKmsConfigResponse": { + "fields": { + "healthy": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "healthError": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instructions": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "KmsConfig": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/KmsConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/kmsConfigs/{kms_config}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cryptoKeyName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "instructions": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "IN_USE": 5, + "ERROR": 6, + "KEY_CHECK_PENDING": 7, + "KEY_NOT_REACHABLE": 8, + "DISABLING": 9, + "DISABLED": 10, + "MIGRATING": 11 + } + } + } + }, + "TransferStats": { + "oneofs": { + "_transferBytes": { + "oneof": [ + "transferBytes" + ] + }, + "_totalTransferDuration": { + "oneof": [ + "totalTransferDuration" + ] + }, + "_lastTransferBytes": { + "oneof": [ + "lastTransferBytes" + ] + }, + "_lastTransferDuration": { + "oneof": [ + "lastTransferDuration" + ] + }, + "_lagDuration": { + "oneof": [ + "lagDuration" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_lastTransferEndTime": { + "oneof": [ + "lastTransferEndTime" + ] + }, + "_lastTransferError": { + "oneof": [ + "lastTransferError" + ] + } + }, + "fields": { + "transferBytes": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "totalTransferDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "lastTransferBytes": { + "type": "int64", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "lastTransferDuration": { + "type": "google.protobuf.Duration", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "lagDuration": { + "type": "google.protobuf.Duration", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "lastTransferEndTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "lastTransferError": { + "type": "string", + "id": 8, + "options": { + "proto3_optional": true + } + } + } + }, + "Replication": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/Replication", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}" + }, + "oneofs": { + "_healthy": { + "oneof": [ + "healthy" + ] + }, + "_description": { + "oneof": [ + "description" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "role": { + "type": "ReplicationRole", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "replicationSchedule": { + "type": "ReplicationSchedule", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mirrorState": { + "type": "MirrorState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "healthy": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "destinationVolume": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "transferStats": { + "type": "TransferStats", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 12 + }, + "description": { + "type": "string", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "destinationVolumeParameters": { + "type": "DestinationVolumeParameters", + "id": 14, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourceVolume": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 5, + "ERROR": 6 + } + }, + "ReplicationRole": { + "values": { + "REPLICATION_ROLE_UNSPECIFIED": 0, + "SOURCE": 1, + "DESTINATION": 2 + } + }, + "ReplicationSchedule": { + "values": { + "REPLICATION_SCHEDULE_UNSPECIFIED": 0, + "EVERY_10_MINUTES": 1, + "HOURLY": 2, + "DAILY": 3 + } + }, + "MirrorState": { + "values": { + "MIRROR_STATE_UNSPECIFIED": 0, + "PREPARING": 1, + "MIRRORED": 2, + "STOPPED": 3, + "TRANSFERRING": 4 + } + } + } + }, + "ListReplicationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Replication" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListReplicationsResponse": { + "fields": { + "replications": { + "rule": "repeated", + "type": "Replication", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "DestinationVolumeParameters": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + } + }, + "fields": { + "storagePool": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + }, + "volumeId": { + "type": "string", + "id": 2 + }, + "shareName": { + "type": "string", + "id": 3 + }, + "description": { + "type": "string", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "CreateReplicationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Replication" + } + }, + "replication": { + "type": "Replication", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "replicationId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "UpdateReplicationRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "replication": { + "type": "Replication", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StopReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "ResumeReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "ReverseReplicationDirectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "ListSnapshotsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Snapshot" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListSnapshotsResponse": { + "fields": { + "snapshots": { + "rule": "repeated", + "type": "Snapshot", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" + } + } + } + }, + "CreateSnapshotRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Snapshot" + } + }, + "snapshot": { + "type": "Snapshot", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "snapshotId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" + } + } + } + }, + "UpdateSnapshotRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "snapshot": { + "type": "Snapshot", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Snapshot": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/Snapshot", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4 + }, + "usedBytes": { + "type": "double", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "DISABLED": 5, + "ERROR": 6 + } + } + } + }, + "GetStoragePoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + } + } + }, + "ListStoragePoolsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/StoragePool" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListStoragePoolsResponse": { + "fields": { + "storagePools": { + "rule": "repeated", + "type": "StoragePool", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateStoragePoolRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/StoragePool" + } + }, + "storagePoolId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "storagePool": { + "type": "StoragePool", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateStoragePoolRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "storagePool": { + "type": "StoragePool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteStoragePoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + } + } + }, + "StoragePool": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/StoragePool", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/storagePools/{storage_pool}" + }, + "oneofs": { + "_globalAccessAllowed": { + "oneof": [ + "globalAccessAllowed" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceLevel": { + "type": "ServiceLevel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "capacityGib": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "volumeCapacityGib": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "volumeCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 9 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10 + }, + "network": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Network" + } + }, + "activeDirectory": { + "type": "string", + "id": 12, + "options": { + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "kmsConfig": { + "type": "string", + "id": 13, + "options": { + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + }, + "ldapEnabled": { + "type": "bool", + "id": 14 + }, + "psaRange": { + "type": "string", + "id": 15 + }, + "encryptionType": { + "type": "EncryptionType", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "globalAccessAllowed": { + "type": "bool", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "RESTORING": 5, + "DISABLED": 6, + "ERROR": 7 + } + } + } + }, + "ServiceLevel": { + "values": { + "SERVICE_LEVEL_UNSPECIFIED": 0, + "PREMIUM": 1, + "EXTREME": 2, + "STANDARD": 3 + } + }, + "EncryptionType": { + "values": { + "ENCRYPTION_TYPE_UNSPECIFIED": 0, + "SERVICE_MANAGED": 1, + "CLOUD_KMS": 2 + } + }, + "Protocols": { + "values": { + "PROTOCOLS_UNSPECIFIED": 0, + "NFSV3": 1, + "NFSV4": 2, + "SMB": 3 + } + }, + "AccessType": { + "values": { + "ACCESS_TYPE_UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + "READ_NONE": 3 + } + }, + "SMBSettings": { + "values": { + "SMB_SETTINGS_UNSPECIFIED": 0, + "ENCRYPT_DATA": 1, + "BROWSABLE": 2, + "CHANGE_NOTIFY": 3, + "NON_BROWSABLE": 4, + "OPLOCKS": 5, + "SHOW_SNAPSHOT": 6, + "SHOW_PREVIOUS_VERSIONS": 7, + "ACCESS_BASED_ENUMERATION": 8, + "CONTINUOUSLY_AVAILABLE": 9 + } + }, + "SecurityStyle": { + "values": { + "SECURITY_STYLE_UNSPECIFIED": 0, + "NTFS": 1, + "UNIX": 2 + } + }, + "RestrictedAction": { + "values": { + "RESTRICTED_ACTION_UNSPECIFIED": 0, + "DELETE": 1 + } + }, + "ListVolumesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Volume" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListVolumesResponse": { + "fields": { + "volumes": { + "rule": "repeated", + "type": "Volume", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetVolumeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + } + } + }, + "CreateVolumeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Volume" + } + }, + "volumeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "volume": { + "type": "Volume", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateVolumeRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "volume": { + "type": "Volume", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteVolumeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "RevertVolumeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "snapshotId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Volume": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/Volume", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "shareName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "psaRange": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "storagePool": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + }, + "network": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "compute.googleapis.com/Network" + } + }, + "serviceLevel": { + "type": "ServiceLevel", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "capacityGib": { + "type": "int64", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "exportPolicy": { + "type": "ExportPolicy", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "protocols": { + "rule": "repeated", + "type": "Protocols", + "id": 12, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "smbSettings": { + "rule": "repeated", + "type": "SMBSettings", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mountOptions": { + "rule": "repeated", + "type": "MountOption", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "unixPermissions": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotPolicy": { + "type": "SnapshotPolicy", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapReserve": { + "type": "double", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotDirectory": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "usedGib": { + "type": "int64", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "securityStyle": { + "type": "SecurityStyle", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kerberosEnabled": { + "type": "bool", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ldapEnabled": { + "type": "bool", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "activeDirectory": { + "type": "string", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "restoreParameters": { + "type": "RestoreParameters", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsConfig": { + "type": "string", + "id": 27, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + }, + "encryptionType": { + "type": "EncryptionType", + "id": 28, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hasReplication": { + "type": "bool", + "id": 29, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "restrictedActions": { + "rule": "repeated", + "type": "RestrictedAction", + "id": 31, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "RESTORING": 5, + "DISABLED": 6, + "ERROR": 7 + } + } + } + }, + "ExportPolicy": { + "fields": { + "rules": { + "rule": "repeated", + "type": "SimpleExportPolicyRule", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SimpleExportPolicyRule": { + "oneofs": { + "_allowedClients": { + "oneof": [ + "allowedClients" + ] + }, + "_hasRootAccess": { + "oneof": [ + "hasRootAccess" + ] + }, + "_accessType": { + "oneof": [ + "accessType" + ] + }, + "_nfsv3": { + "oneof": [ + "nfsv3" + ] + }, + "_nfsv4": { + "oneof": [ + "nfsv4" + ] + }, + "_kerberos_5ReadOnly": { + "oneof": [ + "kerberos_5ReadOnly" + ] + }, + "_kerberos_5ReadWrite": { + "oneof": [ + "kerberos_5ReadWrite" + ] + }, + "_kerberos_5iReadOnly": { + "oneof": [ + "kerberos_5iReadOnly" + ] + }, + "_kerberos_5iReadWrite": { + "oneof": [ + "kerberos_5iReadWrite" + ] + }, + "_kerberos_5pReadOnly": { + "oneof": [ + "kerberos_5pReadOnly" + ] + }, + "_kerberos_5pReadWrite": { + "oneof": [ + "kerberos_5pReadWrite" + ] + } + }, + "fields": { + "allowedClients": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "hasRootAccess": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "accessType": { + "type": "AccessType", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "nfsv3": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "nfsv4": { + "type": "bool", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "kerberos_5ReadOnly": { + "type": "bool", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "kerberos_5ReadWrite": { + "type": "bool", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "kerberos_5iReadOnly": { + "type": "bool", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "kerberos_5iReadWrite": { + "type": "bool", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "kerberos_5pReadOnly": { + "type": "bool", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "kerberos_5pReadWrite": { + "type": "bool", + "id": 11, + "options": { + "proto3_optional": true + } + } + } + }, + "SnapshotPolicy": { + "oneofs": { + "_enabled": { + "oneof": [ + "enabled" + ] + }, + "_hourlySchedule": { + "oneof": [ + "hourlySchedule" + ] + }, + "_dailySchedule": { + "oneof": [ + "dailySchedule" + ] + }, + "_weeklySchedule": { + "oneof": [ + "weeklySchedule" + ] + }, + "_monthlySchedule": { + "oneof": [ + "monthlySchedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "hourlySchedule": { + "type": "HourlySchedule", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "dailySchedule": { + "type": "DailySchedule", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "weeklySchedule": { + "type": "WeeklySchedule", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "monthlySchedule": { + "type": "MonthlySchedule", + "id": 5, + "options": { + "proto3_optional": true + } + } + } + }, + "HourlySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "DailySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "WeeklySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + }, + "_day": { + "oneof": [ + "day" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "day": { + "type": "string", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "MonthlySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + }, + "_daysOfMonth": { + "oneof": [ + "daysOfMonth" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "daysOfMonth": { + "type": "string", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "MountOption": { + "fields": { + "export": { + "type": "string", + "id": 1 + }, + "exportFull": { + "type": "string", + "id": 2 + }, + "protocol": { + "type": "Protocols", + "id": 3 + }, + "instructions": { + "type": "string", + "id": 4 + } + } + }, + "RestoreParameters": { + "oneofs": { + "source": { + "oneof": [ + "sourceSnapshot" + ] + } + }, + "fields": { + "sourceSnapshot": { + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "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, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "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" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + } + } + }, + "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 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "target": { + "type": "OptionTargetType", + "id": 18 + }, + "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 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + } + } + }, + "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 + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "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 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-netapp/samples/README.md b/packages/google-cloud-netapp/samples/README.md new file mode 100644 index 000000000000..43ec3f40ad6b --- /dev/null +++ b/packages/google-cloud-netapp/samples/README.md @@ -0,0 +1,698 @@ +[//]: # "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 + +# [NetApp API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Net_app.create_active_directory](#net_app.create_active_directory) + * [Net_app.create_kms_config](#net_app.create_kms_config) + * [Net_app.create_replication](#net_app.create_replication) + * [Net_app.create_snapshot](#net_app.create_snapshot) + * [Net_app.create_storage_pool](#net_app.create_storage_pool) + * [Net_app.create_volume](#net_app.create_volume) + * [Net_app.delete_active_directory](#net_app.delete_active_directory) + * [Net_app.delete_kms_config](#net_app.delete_kms_config) + * [Net_app.delete_replication](#net_app.delete_replication) + * [Net_app.delete_snapshot](#net_app.delete_snapshot) + * [Net_app.delete_storage_pool](#net_app.delete_storage_pool) + * [Net_app.delete_volume](#net_app.delete_volume) + * [Net_app.encrypt_volumes](#net_app.encrypt_volumes) + * [Net_app.get_active_directory](#net_app.get_active_directory) + * [Net_app.get_kms_config](#net_app.get_kms_config) + * [Net_app.get_replication](#net_app.get_replication) + * [Net_app.get_snapshot](#net_app.get_snapshot) + * [Net_app.get_storage_pool](#net_app.get_storage_pool) + * [Net_app.get_volume](#net_app.get_volume) + * [Net_app.list_active_directories](#net_app.list_active_directories) + * [Net_app.list_kms_configs](#net_app.list_kms_configs) + * [Net_app.list_replications](#net_app.list_replications) + * [Net_app.list_snapshots](#net_app.list_snapshots) + * [Net_app.list_storage_pools](#net_app.list_storage_pools) + * [Net_app.list_volumes](#net_app.list_volumes) + * [Net_app.resume_replication](#net_app.resume_replication) + * [Net_app.reverse_replication_direction](#net_app.reverse_replication_direction) + * [Net_app.revert_volume](#net_app.revert_volume) + * [Net_app.stop_replication](#net_app.stop_replication) + * [Net_app.update_active_directory](#net_app.update_active_directory) + * [Net_app.update_kms_config](#net_app.update_kms_config) + * [Net_app.update_replication](#net_app.update_replication) + * [Net_app.update_snapshot](#net_app.update_snapshot) + * [Net_app.update_storage_pool](#net_app.update_storage_pool) + * [Net_app.update_volume](#net_app.update_volume) + * [Net_app.verify_kms_config](#net_app.verify_kms_config) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Net_app.create_active_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_active_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js` + + +----- + + + + +### Net_app.create_kms_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js` + + +----- + + + + +### Net_app.create_replication + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_replication.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js` + + +----- + + + + +### Net_app.create_snapshot + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_snapshot.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js` + + +----- + + + + +### Net_app.create_storage_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_storage_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js` + + +----- + + + + +### Net_app.create_volume + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.create_volume.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js` + + +----- + + + + +### Net_app.delete_active_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_active_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js` + + +----- + + + + +### Net_app.delete_kms_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js` + + +----- + + + + +### Net_app.delete_replication + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_replication.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js` + + +----- + + + + +### Net_app.delete_snapshot + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_snapshot.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js` + + +----- + + + + +### Net_app.delete_storage_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_storage_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js` + + +----- + + + + +### Net_app.delete_volume + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.delete_volume.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js` + + +----- + + + + +### Net_app.encrypt_volumes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.encrypt_volumes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js` + + +----- + + + + +### Net_app.get_active_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_active_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js` + + +----- + + + + +### Net_app.get_kms_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js` + + +----- + + + + +### Net_app.get_replication + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_replication.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js` + + +----- + + + + +### Net_app.get_snapshot + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_snapshot.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js` + + +----- + + + + +### Net_app.get_storage_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_storage_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js` + + +----- + + + + +### Net_app.get_volume + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.get_volume.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js` + + +----- + + + + +### Net_app.list_active_directories + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_active_directories.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js` + + +----- + + + + +### Net_app.list_kms_configs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js` + + +----- + + + + +### Net_app.list_replications + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_replications.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js` + + +----- + + + + +### Net_app.list_snapshots + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_snapshots.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js` + + +----- + + + + +### Net_app.list_storage_pools + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_storage_pools.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js` + + +----- + + + + +### Net_app.list_volumes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.list_volumes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js` + + +----- + + + + +### Net_app.resume_replication + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.resume_replication.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js` + + +----- + + + + +### Net_app.reverse_replication_direction + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.reverse_replication_direction.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js` + + +----- + + + + +### Net_app.revert_volume + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.revert_volume.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js` + + +----- + + + + +### Net_app.stop_replication + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.stop_replication.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js` + + +----- + + + + +### Net_app.update_active_directory + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_active_directory.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js` + + +----- + + + + +### Net_app.update_kms_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js` + + +----- + + + + +### Net_app.update_replication + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_replication.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js` + + +----- + + + + +### Net_app.update_snapshot + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_snapshot.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js` + + +----- + + + + +### Net_app.update_storage_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_storage_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js` + + +----- + + + + +### Net_app.update_volume + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js). + +[![Open in Cloud 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-netapp/samples/generated/v1/net_app.update_volume.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js` + + +----- + + + + +### Net_app.verify_kms_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/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-netapp/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-netapp/samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/netapp/volumes/docs/discover/overview diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js new file mode 100644 index 000000000000..715eed1a2304 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, activeDirectory, activeDirectoryId) { + // [START netapp_v1_generated_NetApp_CreateActiveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. Fields of the to be created active directory. + */ + // const activeDirectory = {} + /** + * Required. ID of the active directory to create. + */ + // const activeDirectoryId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateActiveDirectory() { + // Construct request + const request = { + parent, + activeDirectory, + activeDirectoryId, + }; + + // Run request + const [operation] = await netappClient.createActiveDirectory(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateActiveDirectory(); + // [END netapp_v1_generated_NetApp_CreateActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js new file mode 100644 index 000000000000..42fbde6107ef --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js @@ -0,0 +1,74 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, kmsConfigId, kmsConfig) { + // [START netapp_v1_generated_NetApp_CreateKmsConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. Id of the requesting KmsConfig + * If auto-generating Id server-side, remove this field and + * id from the method_signature of Create RPC + */ + // const kmsConfigId = 'abc123' + /** + * Required. The required parameters to create a new KmsConfig. + */ + // const kmsConfig = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateKmsConfig() { + // Construct request + const request = { + parent, + kmsConfigId, + kmsConfig, + }; + + // Run request + const [operation] = await netappClient.createKmsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateKmsConfig(); + // [END netapp_v1_generated_NetApp_CreateKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js new file mode 100644 index 000000000000..d6913ef92805 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js @@ -0,0 +1,75 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, replication, replicationId) { + // [START netapp_v1_generated_NetApp_CreateReplication_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + */ + // const parent = 'abc123' + /** + * Required. A replication resource + */ + // const replication = {} + /** + * Required. ID of the replication to create. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + */ + // const replicationId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateReplication() { + // Construct request + const request = { + parent, + replication, + replicationId, + }; + + // Run request + const [operation] = await netappClient.createReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateReplication(); + // [END netapp_v1_generated_NetApp_CreateReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js new file mode 100644 index 000000000000..01a4469fc056 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js @@ -0,0 +1,75 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, snapshot, snapshotId) { + // [START netapp_v1_generated_NetApp_CreateSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + */ + // const parent = 'abc123' + /** + * Required. A snapshot resource + */ + // const snapshot = {} + /** + * Required. ID of the snapshot to create. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + */ + // const snapshotId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateSnapshot() { + // Construct request + const request = { + parent, + snapshot, + snapshotId, + }; + + // Run request + const [operation] = await netappClient.createSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateSnapshot(); + // [END netapp_v1_generated_NetApp_CreateSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js new file mode 100644 index 000000000000..601f6eb6c91c --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js @@ -0,0 +1,74 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, storagePoolId, storagePool) { + // [START netapp_v1_generated_NetApp_CreateStoragePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. Id of the requesting storage pool + * If auto-generating Id server-side, remove this field and + * id from the method_signature of Create RPC + */ + // const storagePoolId = 'abc123' + /** + * Required. The required parameters to create a new storage pool. + */ + // const storagePool = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateStoragePool() { + // Construct request + const request = { + parent, + storagePoolId, + storagePool, + }; + + // Run request + const [operation] = await netappClient.createStoragePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateStoragePool(); + // [END netapp_v1_generated_NetApp_CreateStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js new file mode 100644 index 000000000000..897d7acff6fd --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js @@ -0,0 +1,74 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, volumeId, volume) { + // [START netapp_v1_generated_NetApp_CreateVolume_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. Id of the requesting volume + * If auto-generating Id server-side, remove this field and + * Id from the method_signature of Create RPC + */ + // const volumeId = 'abc123' + /** + * Required. The volume being created. + */ + // const volume = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateVolume() { + // Construct request + const request = { + parent, + volumeId, + volume, + }; + + // Run request + const [operation] = await netappClient.createVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateVolume(); + // [END netapp_v1_generated_NetApp_CreateVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js new file mode 100644 index 000000000000..bd7216c5e8a3 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_DeleteActiveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the active directory. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteActiveDirectory() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteActiveDirectory(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteActiveDirectory(); + // [END netapp_v1_generated_NetApp_DeleteActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js new file mode 100644 index 000000000000..c7aaeb152165 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_DeleteKmsConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the KmsConfig. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteKmsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteKmsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteKmsConfig(); + // [END netapp_v1_generated_NetApp_DeleteKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js new file mode 100644 index 000000000000..8827e18ed604 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_DeleteReplication_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The replication resource name, in the format + * `projects/* /locations/* /volumes/* /replications/{replication_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteReplication(); + // [END netapp_v1_generated_NetApp_DeleteReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js new file mode 100644 index 000000000000..952ef32a0f4c --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_DeleteSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The snapshot resource name, in the format + * `projects/* /locations/* /volumes/* /snapshots/{snapshot_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteSnapshot(); + // [END netapp_v1_generated_NetApp_DeleteSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js new file mode 100644 index 000000000000..80e779863432 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_DeleteStoragePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the storage pool + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteStoragePool() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteStoragePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteStoragePool(); + // [END netapp_v1_generated_NetApp_DeleteStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js new file mode 100644 index 000000000000..ad9cd1d70808 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js @@ -0,0 +1,68 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_DeleteVolume_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the volume + */ + // const name = 'abc123' + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + */ + // const force = true + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteVolume() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteVolume(); + // [END netapp_v1_generated_NetApp_DeleteVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js new file mode 100644 index 000000000000..90a18bcc0f3e --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_EncryptVolumes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the KmsConfig. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callEncryptVolumes() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.encryptVolumes(request); + const [response] = await operation.promise(); + console.log(response); + } + + callEncryptVolumes(); + // [END netapp_v1_generated_NetApp_EncryptVolumes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js new file mode 100644 index 000000000000..cf49f8ba792b --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_GetActiveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the active directory. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetActiveDirectory() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getActiveDirectory(request); + console.log(response); + } + + callGetActiveDirectory(); + // [END netapp_v1_generated_NetApp_GetActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js new file mode 100644 index 000000000000..7b11405498fa --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_GetKmsConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the KmsConfig + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetKmsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getKmsConfig(request); + console.log(response); + } + + callGetKmsConfig(); + // [END netapp_v1_generated_NetApp_GetKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js new file mode 100644 index 000000000000..a74a04cd47e9 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_GetReplication_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getReplication(request); + console.log(response); + } + + callGetReplication(); + // [END netapp_v1_generated_NetApp_GetReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js new file mode 100644 index 000000000000..d131d3fddd85 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_GetSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getSnapshot(request); + console.log(response); + } + + callGetSnapshot(); + // [END netapp_v1_generated_NetApp_GetSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js new file mode 100644 index 000000000000..7828dcae9d10 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_GetStoragePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the storage pool + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetStoragePool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getStoragePool(request); + console.log(response); + } + + callGetStoragePool(); + // [END netapp_v1_generated_NetApp_GetStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js new file mode 100644 index 000000000000..22315cba127b --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_GetVolume_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the volume + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetVolume() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getVolume(request); + console.log(response); + } + + callGetVolume(); + // [END netapp_v1_generated_NetApp_GetVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js new file mode 100644 index 000000000000..c9fb06cc1613 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js @@ -0,0 +1,80 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START netapp_v1_generated_NetApp_ListActiveDirectories_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListActiveDirectoriesRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListActiveDirectories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listActiveDirectoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListActiveDirectories(); + // [END netapp_v1_generated_NetApp_ListActiveDirectories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js new file mode 100644 index 000000000000..2bc2b54d672d --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js @@ -0,0 +1,80 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START netapp_v1_generated_NetApp_ListKmsConfigs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListKmsConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listKmsConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListKmsConfigs(); + // [END netapp_v1_generated_NetApp_ListKmsConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js new file mode 100644 index 000000000000..377f97def540 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js @@ -0,0 +1,82 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START netapp_v1_generated_NetApp_ListReplications_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListReplications() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listReplicationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReplications(); + // [END netapp_v1_generated_NetApp_ListReplications_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js new file mode 100644 index 000000000000..3380240c7bab --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js @@ -0,0 +1,82 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START netapp_v1_generated_NetApp_ListSnapshots_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListSnapshots() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listSnapshotsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSnapshots(); + // [END netapp_v1_generated_NetApp_ListSnapshots_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js new file mode 100644 index 000000000000..fc5e012c0912 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js @@ -0,0 +1,80 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START netapp_v1_generated_NetApp_ListStoragePools_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListStoragePools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listStoragePoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListStoragePools(); + // [END netapp_v1_generated_NetApp_ListStoragePools_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js new file mode 100644 index 000000000000..9b3591bde6e2 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js @@ -0,0 +1,80 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START netapp_v1_generated_NetApp_ListVolumes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListVolumesRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListVolumes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listVolumesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVolumes(); + // [END netapp_v1_generated_NetApp_ListVolumes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js new file mode 100644 index 000000000000..3e944375f428 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_ResumeReplication_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callResumeReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.resumeReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callResumeReplication(); + // [END netapp_v1_generated_NetApp_ResumeReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js new file mode 100644 index 000000000000..5c212c7ba0f1 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_ReverseReplicationDirection_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callReverseReplicationDirection() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.reverseReplicationDirection(request); + const [response] = await operation.promise(); + console.log(response); + } + + callReverseReplicationDirection(); + // [END netapp_v1_generated_NetApp_ReverseReplicationDirection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js new file mode 100644 index 000000000000..caf88da4399e --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js @@ -0,0 +1,70 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, snapshotId) { + // [START netapp_v1_generated_NetApp_RevertVolume_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + */ + // const name = 'abc123' + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + */ + // const snapshotId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callRevertVolume() { + // Construct request + const request = { + name, + snapshotId, + }; + + // Run request + const [operation] = await netappClient.revertVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRevertVolume(); + // [END netapp_v1_generated_NetApp_RevertVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js new file mode 100644 index 000000000000..4e27ce91b8bb --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_StopReplication_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + */ + // const force = true + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callStopReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.stopReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callStopReplication(); + // [END netapp_v1_generated_NetApp_StopReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js new file mode 100644 index 000000000000..04ad2197e0e7 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, activeDirectory) { + // [START netapp_v1_generated_NetApp_UpdateActiveDirectory_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The volume being updated + */ + // const activeDirectory = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateActiveDirectory() { + // Construct request + const request = { + updateMask, + activeDirectory, + }; + + // Run request + const [operation] = await netappClient.updateActiveDirectory(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateActiveDirectory(); + // [END netapp_v1_generated_NetApp_UpdateActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js new file mode 100644 index 000000000000..c7520940db6c --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, kmsConfig) { + // [START netapp_v1_generated_NetApp_UpdateKmsConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The KmsConfig being updated + */ + // const kmsConfig = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateKmsConfig() { + // Construct request + const request = { + updateMask, + kmsConfig, + }; + + // Run request + const [operation] = await netappClient.updateKmsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateKmsConfig(); + // [END netapp_v1_generated_NetApp_UpdateKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js new file mode 100644 index 000000000000..b992555e9f9c --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js @@ -0,0 +1,68 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, replication) { + // [START netapp_v1_generated_NetApp_UpdateReplication_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. A replication resource + */ + // const replication = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateReplication() { + // Construct request + const request = { + updateMask, + replication, + }; + + // Run request + const [operation] = await netappClient.updateReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateReplication(); + // [END netapp_v1_generated_NetApp_UpdateReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js new file mode 100644 index 000000000000..e69a3d74535a --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js @@ -0,0 +1,68 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, snapshot) { + // [START netapp_v1_generated_NetApp_UpdateSnapshot_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. A snapshot resource + */ + // const snapshot = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateSnapshot() { + // Construct request + const request = { + updateMask, + snapshot, + }; + + // Run request + const [operation] = await netappClient.updateSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateSnapshot(); + // [END netapp_v1_generated_NetApp_UpdateSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js new file mode 100644 index 000000000000..2e7b6e633f10 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, storagePool) { + // [START netapp_v1_generated_NetApp_UpdateStoragePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The pool being updated + */ + // const storagePool = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateStoragePool() { + // Construct request + const request = { + updateMask, + storagePool, + }; + + // Run request + const [operation] = await netappClient.updateStoragePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateStoragePool(); + // [END netapp_v1_generated_NetApp_UpdateStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js new file mode 100644 index 000000000000..5e78b4a1ac16 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, volume) { + // [START netapp_v1_generated_NetApp_UpdateVolume_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The volume being updated + */ + // const volume = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateVolume() { + // Construct request + const request = { + updateMask, + volume, + }; + + // Run request + const [operation] = await netappClient.updateVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateVolume(); + // [END netapp_v1_generated_NetApp_UpdateVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js new file mode 100644 index 000000000000..65d56dd45808 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START netapp_v1_generated_NetApp_VerifyKmsConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the KMS Config to be verified. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callVerifyKmsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.verifyKmsConfig(request); + console.log(response); + } + + callVerifyKmsConfig(); + // [END netapp_v1_generated_NetApp_VerifyKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json new file mode 100644 index 000000000000..61e973ad25a0 --- /dev/null +++ b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json @@ -0,0 +1,1635 @@ +{ + "clientLibrary": { + "name": "nodejs-netapp", + "version": "0.0.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.netapp.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "netapp_v1_generated_NetApp_ListStoragePools_async", + "title": "NetApp listStoragePools Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all storage pools owned by the caller.", + "canonical": true, + "file": "net_app.list_storage_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListStoragePools", + "fullName": "google.cloud.netapp.v1.NetApp.ListStoragePools", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListStoragePoolsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListStoragePools", + "fullName": "google.cloud.netapp.v1.NetApp.ListStoragePools", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateStoragePool_async", + "title": "NetApp createStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Creates a new storage pool.", + "canonical": true, + "file": "net_app.create_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.CreateStoragePool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "storage_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "storage_pool", + "type": ".google.cloud.netapp.v1.StoragePool" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.CreateStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetStoragePool_async", + "title": "NetApp getStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Returns the description of the specified storage pool by poolId.", + "canonical": true, + "file": "net_app.get_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.GetStoragePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.StoragePool", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.GetStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateStoragePool_async", + "title": "NetApp updateStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Updates the storage pool properties with the full spec", + "canonical": true, + "file": "net_app.update_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateStoragePool", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "storage_pool", + "type": ".google.cloud.netapp.v1.StoragePool" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteStoragePool_async", + "title": "NetApp deleteStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Warning! This operation will permanently delete the storage pool.", + "canonical": true, + "file": "net_app.delete_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteStoragePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListVolumes_async", + "title": "NetApp listVolumes Sample", + "origin": "API_DEFINITION", + "description": " Lists Volumes in a given project.", + "canonical": true, + "file": "net_app.list_volumes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.ListVolumes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListVolumesResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.ListVolumes", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetVolume_async", + "title": "NetApp getVolume Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Volume.", + "canonical": true, + "file": "net_app.get_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVolume", + "fullName": "google.cloud.netapp.v1.NetApp.GetVolume", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.Volume", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetVolume", + "fullName": "google.cloud.netapp.v1.NetApp.GetVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateVolume_async", + "title": "NetApp createVolume Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Volume in a given project and location.", + "canonical": true, + "file": "net_app.create_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.CreateVolume", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "volume_id", + "type": "TYPE_STRING" + }, + { + "name": "volume", + "type": ".google.cloud.netapp.v1.Volume" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.CreateVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateVolume_async", + "title": "NetApp updateVolume Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Volume.", + "canonical": true, + "file": "net_app.update_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateVolume", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "volume", + "type": ".google.cloud.netapp.v1.Volume" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteVolume_async", + "title": "NetApp deleteVolume Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Volume.", + "canonical": true, + "file": "net_app.delete_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteVolume", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteVolume", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteVolume", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_RevertVolume_async", + "title": "NetApp revertVolume Sample", + "origin": "API_DEFINITION", + "description": " Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.", + "canonical": true, + "file": "net_app.revert_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RevertVolume", + "fullName": "google.cloud.netapp.v1.NetApp.RevertVolume", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "snapshot_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "RevertVolume", + "fullName": "google.cloud.netapp.v1.NetApp.RevertVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListSnapshots_async", + "title": "NetApp listSnapshots Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all snapshots for a volume.", + "canonical": true, + "file": "net_app.list_snapshots.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSnapshots", + "fullName": "google.cloud.netapp.v1.NetApp.ListSnapshots", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListSnapshotsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListSnapshots", + "fullName": "google.cloud.netapp.v1.NetApp.ListSnapshots", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetSnapshot_async", + "title": "NetApp getSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Describe a snapshot for a volume.", + "canonical": true, + "file": "net_app.get_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.GetSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.Snapshot", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.GetSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateSnapshot_async", + "title": "NetApp createSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Create a new snapshot for a volume.", + "canonical": true, + "file": "net_app.create_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.CreateSnapshot", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "snapshot", + "type": ".google.cloud.netapp.v1.Snapshot" + }, + { + "name": "snapshot_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.CreateSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteSnapshot_async", + "title": "NetApp deleteSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Deletes a snapshot.", + "canonical": true, + "file": "net_app.delete_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateSnapshot_async", + "title": "NetApp updateSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a specific snapshot.", + "canonical": true, + "file": "net_app.update_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateSnapshot", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "snapshot", + "type": ".google.cloud.netapp.v1.Snapshot" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListActiveDirectories_async", + "title": "NetApp listActiveDirectories Sample", + "origin": "API_DEFINITION", + "description": " Lists active directories.", + "canonical": true, + "file": "net_app.list_active_directories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListActiveDirectories", + "fullName": "google.cloud.netapp.v1.NetApp.ListActiveDirectories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListActiveDirectoriesResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListActiveDirectories", + "fullName": "google.cloud.netapp.v1.NetApp.ListActiveDirectories", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetActiveDirectory_async", + "title": "NetApp getActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Describes a specified active directory.", + "canonical": true, + "file": "net_app.get_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.GetActiveDirectory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ActiveDirectory", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.GetActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateActiveDirectory_async", + "title": "NetApp createActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " CreateActiveDirectory Creates the active directory specified in the request.", + "canonical": true, + "file": "net_app.create_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.CreateActiveDirectory", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "active_directory", + "type": ".google.cloud.netapp.v1.ActiveDirectory" + }, + { + "name": "active_directory_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.CreateActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateActiveDirectory_async", + "title": "NetApp updateActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Update the parameters of an active directories.", + "canonical": true, + "file": "net_app.update_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateActiveDirectory", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "active_directory", + "type": ".google.cloud.netapp.v1.ActiveDirectory" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteActiveDirectory_async", + "title": "NetApp deleteActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Delete the active directory specified in the request.", + "canonical": true, + "file": "net_app.delete_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteActiveDirectory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListKmsConfigs_async", + "title": "NetApp listKmsConfigs Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all KMS configs owned by the caller.", + "canonical": true, + "file": "net_app.list_kms_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListKmsConfigs", + "fullName": "google.cloud.netapp.v1.NetApp.ListKmsConfigs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListKmsConfigsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListKmsConfigs", + "fullName": "google.cloud.netapp.v1.NetApp.ListKmsConfigs", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateKmsConfig_async", + "title": "NetApp createKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Creates a new KMS config.", + "canonical": true, + "file": "net_app.create_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.CreateKmsConfig", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "kms_config_id", + "type": "TYPE_STRING" + }, + { + "name": "kms_config", + "type": ".google.cloud.netapp.v1.KmsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.CreateKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetKmsConfig_async", + "title": "NetApp getKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns the description of the specified KMS config by kms_config_id.", + "canonical": true, + "file": "net_app.get_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.GetKmsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.KmsConfig", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.GetKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateKmsConfig_async", + "title": "NetApp updateKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates the Kms config properties with the full spec", + "canonical": true, + "file": "net_app.update_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateKmsConfig", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "kms_config", + "type": ".google.cloud.netapp.v1.KmsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_EncryptVolumes_async", + "title": "NetApp encryptVolumes Sample", + "origin": "API_DEFINITION", + "description": " Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.", + "canonical": true, + "file": "net_app.encrypt_volumes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EncryptVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.EncryptVolumes", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "EncryptVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.EncryptVolumes", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_VerifyKmsConfig_async", + "title": "NetApp verifyKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Verifies KMS config reachability.", + "canonical": true, + "file": "net_app.verify_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "VerifyKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.VerifyKmsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.VerifyKmsConfigResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "VerifyKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.VerifyKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteKmsConfig_async", + "title": "NetApp deleteKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Warning! This operation will permanently delete the Kms config.", + "canonical": true, + "file": "net_app.delete_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteKmsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListReplications_async", + "title": "NetApp listReplications Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all replications for a volume.", + "canonical": true, + "file": "net_app.list_replications.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReplications", + "fullName": "google.cloud.netapp.v1.NetApp.ListReplications", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListReplicationsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListReplications", + "fullName": "google.cloud.netapp.v1.NetApp.ListReplications", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetReplication_async", + "title": "NetApp getReplication Sample", + "origin": "API_DEFINITION", + "description": " Describe a replication for a volume.", + "canonical": true, + "file": "net_app.get_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReplication", + "fullName": "google.cloud.netapp.v1.NetApp.GetReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.Replication", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetReplication", + "fullName": "google.cloud.netapp.v1.NetApp.GetReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateReplication_async", + "title": "NetApp createReplication Sample", + "origin": "API_DEFINITION", + "description": " Create a new replication for a volume.", + "canonical": true, + "file": "net_app.create_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.CreateReplication", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "replication", + "type": ".google.cloud.netapp.v1.Replication" + }, + { + "name": "replication_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.CreateReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteReplication_async", + "title": "NetApp deleteReplication Sample", + "origin": "API_DEFINITION", + "description": " Deletes a replication.", + "canonical": true, + "file": "net_app.delete_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteReplication", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteReplication", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateReplication_async", + "title": "NetApp updateReplication Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a specific replication.", + "canonical": true, + "file": "net_app.update_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateReplication", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "replication", + "type": ".google.cloud.netapp.v1.Replication" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_StopReplication_async", + "title": "NetApp stopReplication Sample", + "origin": "API_DEFINITION", + "description": " Stop Cross Region Replication.", + "canonical": true, + "file": "net_app.stop_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StopReplication", + "fullName": "google.cloud.netapp.v1.NetApp.StopReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "StopReplication", + "fullName": "google.cloud.netapp.v1.NetApp.StopReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ResumeReplication_async", + "title": "NetApp resumeReplication Sample", + "origin": "API_DEFINITION", + "description": " Resume Cross Region Replication.", + "canonical": true, + "file": "net_app.resume_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResumeReplication", + "fullName": "google.cloud.netapp.v1.NetApp.ResumeReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ResumeReplication", + "fullName": "google.cloud.netapp.v1.NetApp.ResumeReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ReverseReplicationDirection_async", + "title": "NetApp reverseReplicationDirection Sample", + "origin": "API_DEFINITION", + "description": " Reverses direction of replication. Source becomes destination and destination becomes source.", + "canonical": true, + "file": "net_app.reverse_replication_direction.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReverseReplicationDirection", + "fullName": "google.cloud.netapp.v1.NetApp.ReverseReplicationDirection", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ReverseReplicationDirection", + "fullName": "google.cloud.netapp.v1.NetApp.ReverseReplicationDirection", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-netapp/samples/package.json b/packages/google-cloud-netapp/samples/package.json new file mode 100644 index 000000000000..178eb9cb3551 --- /dev/null +++ b/packages/google-cloud-netapp/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "netapp-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=14.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@google-cloud/netapp": "0.0.0" + }, + "devDependencies": { + "c8": "^8.0.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-netapp/samples/quickstart.js b/packages/google-cloud-netapp/samples/quickstart.js new file mode 100644 index 000000000000..12e753526845 --- /dev/null +++ b/packages/google-cloud-netapp/samples/quickstart.js @@ -0,0 +1,78 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +function main(parent) { + // [START netapp_quickstart] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListStoragePools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await netappClient.listStoragePoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListStoragePools(); + // [END netapp_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-netapp/samples/test/quickstart.js b/packages/google-cloud-netapp/samples/test/quickstart.js new file mode 100644 index 000000000000..2e9fa4254340 --- /dev/null +++ b/packages/google-cloud-netapp/samples/test/quickstart.js @@ -0,0 +1,42 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const path = require('path'); +const cp = require('child_process'); +const {describe, it, before} = require('mocha'); +const {NetAppClient} = require('@google-cloud/netapp').v1; +const netappClient = new NetAppClient(); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await netappClient.getProjectId(); + }); + + it('should run quickstart', async () => { + const output = execSync( + `node ./quickstart.js projects/${projectId}/locations/us-central1`, + {cwd} + ); + assert(output !== null); + }); +}); diff --git a/packages/google-cloud-netapp/src/index.ts b/packages/google-cloud-netapp/src/index.ts new file mode 100644 index 000000000000..578dfa92d2cc --- /dev/null +++ b/packages/google-cloud-netapp/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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 NetAppClient = v1.NetAppClient; +type NetAppClient = v1.NetAppClient; + +export {v1, NetAppClient}; +export default {v1, NetAppClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-netapp/src/v1/gapic_metadata.json b/packages/google-cloud-netapp/src/v1/gapic_metadata.json new file mode 100644 index 000000000000..b999d55bfe00 --- /dev/null +++ b/packages/google-cloud-netapp/src/v1/gapic_metadata.json @@ -0,0 +1,407 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.netapp.v1", + "libraryPackage": "@google-cloud/netapp", + "services": { + "NetApp": { + "clients": { + "grpc": { + "libraryClient": "NetAppClient", + "rpcs": { + "GetStoragePool": { + "methods": [ + "getStoragePool" + ] + }, + "GetVolume": { + "methods": [ + "getVolume" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "GetActiveDirectory": { + "methods": [ + "getActiveDirectory" + ] + }, + "GetKmsConfig": { + "methods": [ + "getKmsConfig" + ] + }, + "VerifyKmsConfig": { + "methods": [ + "verifyKmsConfig" + ] + }, + "GetReplication": { + "methods": [ + "getReplication" + ] + }, + "CreateStoragePool": { + "methods": [ + "createStoragePool" + ] + }, + "UpdateStoragePool": { + "methods": [ + "updateStoragePool" + ] + }, + "DeleteStoragePool": { + "methods": [ + "deleteStoragePool" + ] + }, + "CreateVolume": { + "methods": [ + "createVolume" + ] + }, + "UpdateVolume": { + "methods": [ + "updateVolume" + ] + }, + "DeleteVolume": { + "methods": [ + "deleteVolume" + ] + }, + "RevertVolume": { + "methods": [ + "revertVolume" + ] + }, + "CreateSnapshot": { + "methods": [ + "createSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "UpdateSnapshot": { + "methods": [ + "updateSnapshot" + ] + }, + "CreateActiveDirectory": { + "methods": [ + "createActiveDirectory" + ] + }, + "UpdateActiveDirectory": { + "methods": [ + "updateActiveDirectory" + ] + }, + "DeleteActiveDirectory": { + "methods": [ + "deleteActiveDirectory" + ] + }, + "CreateKmsConfig": { + "methods": [ + "createKmsConfig" + ] + }, + "UpdateKmsConfig": { + "methods": [ + "updateKmsConfig" + ] + }, + "EncryptVolumes": { + "methods": [ + "encryptVolumes" + ] + }, + "DeleteKmsConfig": { + "methods": [ + "deleteKmsConfig" + ] + }, + "CreateReplication": { + "methods": [ + "createReplication" + ] + }, + "DeleteReplication": { + "methods": [ + "deleteReplication" + ] + }, + "UpdateReplication": { + "methods": [ + "updateReplication" + ] + }, + "StopReplication": { + "methods": [ + "stopReplication" + ] + }, + "ResumeReplication": { + "methods": [ + "resumeReplication" + ] + }, + "ReverseReplicationDirection": { + "methods": [ + "reverseReplicationDirection" + ] + }, + "ListStoragePools": { + "methods": [ + "listStoragePools", + "listStoragePoolsStream", + "listStoragePoolsAsync" + ] + }, + "ListVolumes": { + "methods": [ + "listVolumes", + "listVolumesStream", + "listVolumesAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListActiveDirectories": { + "methods": [ + "listActiveDirectories", + "listActiveDirectoriesStream", + "listActiveDirectoriesAsync" + ] + }, + "ListKmsConfigs": { + "methods": [ + "listKmsConfigs", + "listKmsConfigsStream", + "listKmsConfigsAsync" + ] + }, + "ListReplications": { + "methods": [ + "listReplications", + "listReplicationsStream", + "listReplicationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "NetAppClient", + "rpcs": { + "GetStoragePool": { + "methods": [ + "getStoragePool" + ] + }, + "GetVolume": { + "methods": [ + "getVolume" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "GetActiveDirectory": { + "methods": [ + "getActiveDirectory" + ] + }, + "GetKmsConfig": { + "methods": [ + "getKmsConfig" + ] + }, + "VerifyKmsConfig": { + "methods": [ + "verifyKmsConfig" + ] + }, + "GetReplication": { + "methods": [ + "getReplication" + ] + }, + "CreateStoragePool": { + "methods": [ + "createStoragePool" + ] + }, + "UpdateStoragePool": { + "methods": [ + "updateStoragePool" + ] + }, + "DeleteStoragePool": { + "methods": [ + "deleteStoragePool" + ] + }, + "CreateVolume": { + "methods": [ + "createVolume" + ] + }, + "UpdateVolume": { + "methods": [ + "updateVolume" + ] + }, + "DeleteVolume": { + "methods": [ + "deleteVolume" + ] + }, + "RevertVolume": { + "methods": [ + "revertVolume" + ] + }, + "CreateSnapshot": { + "methods": [ + "createSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "UpdateSnapshot": { + "methods": [ + "updateSnapshot" + ] + }, + "CreateActiveDirectory": { + "methods": [ + "createActiveDirectory" + ] + }, + "UpdateActiveDirectory": { + "methods": [ + "updateActiveDirectory" + ] + }, + "DeleteActiveDirectory": { + "methods": [ + "deleteActiveDirectory" + ] + }, + "CreateKmsConfig": { + "methods": [ + "createKmsConfig" + ] + }, + "UpdateKmsConfig": { + "methods": [ + "updateKmsConfig" + ] + }, + "EncryptVolumes": { + "methods": [ + "encryptVolumes" + ] + }, + "DeleteKmsConfig": { + "methods": [ + "deleteKmsConfig" + ] + }, + "CreateReplication": { + "methods": [ + "createReplication" + ] + }, + "DeleteReplication": { + "methods": [ + "deleteReplication" + ] + }, + "UpdateReplication": { + "methods": [ + "updateReplication" + ] + }, + "StopReplication": { + "methods": [ + "stopReplication" + ] + }, + "ResumeReplication": { + "methods": [ + "resumeReplication" + ] + }, + "ReverseReplicationDirection": { + "methods": [ + "reverseReplicationDirection" + ] + }, + "ListStoragePools": { + "methods": [ + "listStoragePools", + "listStoragePoolsStream", + "listStoragePoolsAsync" + ] + }, + "ListVolumes": { + "methods": [ + "listVolumes", + "listVolumesStream", + "listVolumesAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListActiveDirectories": { + "methods": [ + "listActiveDirectories", + "listActiveDirectoriesStream", + "listActiveDirectoriesAsync" + ] + }, + "ListKmsConfigs": { + "methods": [ + "listKmsConfigs", + "listKmsConfigsStream", + "listKmsConfigsAsync" + ] + }, + "ListReplications": { + "methods": [ + "listReplications", + "listReplicationsStream", + "listReplicationsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-netapp/src/v1/index.ts b/packages/google-cloud-netapp/src/v1/index.ts new file mode 100644 index 000000000000..9a4c7c01d3bb --- /dev/null +++ b/packages/google-cloud-netapp/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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 {NetAppClient} from './net_app_client'; diff --git a/packages/google-cloud-netapp/src/v1/net_app_client.ts b/packages/google-cloud-netapp/src/v1/net_app_client.ts new file mode 100644 index 000000000000..9964e5530290 --- /dev/null +++ b/packages/google-cloud-netapp/src/v1/net_app_client.ts @@ -0,0 +1,6363 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/net_app_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './net_app_client_config.json'; +const version = require('../../../package.json').version; + +/** + * NetApp Files Google Cloud Service + * @class + * @memberof v1 + */ +export class NetAppClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + netAppStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of NetAppClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new NetAppClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof NetAppClient; + 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); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== '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 { + 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 = { + activeDirectoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/activeDirectories/{active_directory}' + ), + kmsConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/kmsConfigs/{kms_config}' + ), + replicationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}' + ), + snapshotPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}' + ), + storagePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/storagePools/{storage_pool}' + ), + volumePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/volumes/{volume}' + ), + }; + + // 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 = { + listStoragePools: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'storagePools' + ), + listVolumes: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'volumes' + ), + listSnapshots: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'snapshots' + ), + listActiveDirectories: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'activeDirectories' + ), + listKmsConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'kmsConfigs' + ), + listReplications: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'replications' + ), + }; + + 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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createStoragePoolResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.StoragePool' + ) as gax.protobuf.Type; + const createStoragePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateStoragePoolResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.StoragePool' + ) as gax.protobuf.Type; + const updateStoragePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteStoragePoolResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteStoragePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createVolumeResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume' + ) as gax.protobuf.Type; + const createVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateVolumeResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume' + ) as gax.protobuf.Type; + const updateVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteVolumeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const revertVolumeResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume' + ) as gax.protobuf.Type; + const revertVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Snapshot' + ) as gax.protobuf.Type; + const createSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteSnapshotResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Snapshot' + ) as gax.protobuf.Type; + const updateSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createActiveDirectoryResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.ActiveDirectory' + ) as gax.protobuf.Type; + const createActiveDirectoryMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateActiveDirectoryResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.ActiveDirectory' + ) as gax.protobuf.Type; + const updateActiveDirectoryMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteActiveDirectoryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteActiveDirectoryMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createKmsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.KmsConfig' + ) as gax.protobuf.Type; + const createKmsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateKmsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.KmsConfig' + ) as gax.protobuf.Type; + const updateKmsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const encryptVolumesResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.KmsConfig' + ) as gax.protobuf.Type; + const encryptVolumesMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteKmsConfigResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteKmsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication' + ) as gax.protobuf.Type; + const createReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteReplicationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication' + ) as gax.protobuf.Type; + const updateReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const stopReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication' + ) as gax.protobuf.Type; + const stopReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const resumeReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication' + ) as gax.protobuf.Type; + const resumeReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + const reverseReplicationDirectionResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication' + ) as gax.protobuf.Type; + const reverseReplicationDirectionMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createStoragePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createStoragePoolResponse.decode.bind(createStoragePoolResponse), + createStoragePoolMetadata.decode.bind(createStoragePoolMetadata) + ), + updateStoragePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateStoragePoolResponse.decode.bind(updateStoragePoolResponse), + updateStoragePoolMetadata.decode.bind(updateStoragePoolMetadata) + ), + deleteStoragePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteStoragePoolResponse.decode.bind(deleteStoragePoolResponse), + deleteStoragePoolMetadata.decode.bind(deleteStoragePoolMetadata) + ), + createVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createVolumeResponse.decode.bind(createVolumeResponse), + createVolumeMetadata.decode.bind(createVolumeMetadata) + ), + updateVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateVolumeResponse.decode.bind(updateVolumeResponse), + updateVolumeMetadata.decode.bind(updateVolumeMetadata) + ), + deleteVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteVolumeResponse.decode.bind(deleteVolumeResponse), + deleteVolumeMetadata.decode.bind(deleteVolumeMetadata) + ), + revertVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + revertVolumeResponse.decode.bind(revertVolumeResponse), + revertVolumeMetadata.decode.bind(revertVolumeMetadata) + ), + createSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createSnapshotResponse.decode.bind(createSnapshotResponse), + createSnapshotMetadata.decode.bind(createSnapshotMetadata) + ), + deleteSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteSnapshotResponse.decode.bind(deleteSnapshotResponse), + deleteSnapshotMetadata.decode.bind(deleteSnapshotMetadata) + ), + updateSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateSnapshotResponse.decode.bind(updateSnapshotResponse), + updateSnapshotMetadata.decode.bind(updateSnapshotMetadata) + ), + createActiveDirectory: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createActiveDirectoryResponse.decode.bind( + createActiveDirectoryResponse + ), + createActiveDirectoryMetadata.decode.bind(createActiveDirectoryMetadata) + ), + updateActiveDirectory: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateActiveDirectoryResponse.decode.bind( + updateActiveDirectoryResponse + ), + updateActiveDirectoryMetadata.decode.bind(updateActiveDirectoryMetadata) + ), + deleteActiveDirectory: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteActiveDirectoryResponse.decode.bind( + deleteActiveDirectoryResponse + ), + deleteActiveDirectoryMetadata.decode.bind(deleteActiveDirectoryMetadata) + ), + createKmsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createKmsConfigResponse.decode.bind(createKmsConfigResponse), + createKmsConfigMetadata.decode.bind(createKmsConfigMetadata) + ), + updateKmsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateKmsConfigResponse.decode.bind(updateKmsConfigResponse), + updateKmsConfigMetadata.decode.bind(updateKmsConfigMetadata) + ), + encryptVolumes: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + encryptVolumesResponse.decode.bind(encryptVolumesResponse), + encryptVolumesMetadata.decode.bind(encryptVolumesMetadata) + ), + deleteKmsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteKmsConfigResponse.decode.bind(deleteKmsConfigResponse), + deleteKmsConfigMetadata.decode.bind(deleteKmsConfigMetadata) + ), + createReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReplicationResponse.decode.bind(createReplicationResponse), + createReplicationMetadata.decode.bind(createReplicationMetadata) + ), + deleteReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteReplicationResponse.decode.bind(deleteReplicationResponse), + deleteReplicationMetadata.decode.bind(deleteReplicationMetadata) + ), + updateReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateReplicationResponse.decode.bind(updateReplicationResponse), + updateReplicationMetadata.decode.bind(updateReplicationMetadata) + ), + stopReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + stopReplicationResponse.decode.bind(stopReplicationResponse), + stopReplicationMetadata.decode.bind(stopReplicationMetadata) + ), + resumeReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + resumeReplicationResponse.decode.bind(resumeReplicationResponse), + resumeReplicationMetadata.decode.bind(resumeReplicationMetadata) + ), + reverseReplicationDirection: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + reverseReplicationDirectionResponse.decode.bind( + reverseReplicationDirectionResponse + ), + reverseReplicationDirectionMetadata.decode.bind( + reverseReplicationDirectionMetadata + ) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.netapp.v1.NetApp', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.netAppStub) { + return this.netAppStub; + } + + // Put together the "service stub" for + // google.cloud.netapp.v1.NetApp. + this.netAppStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.netapp.v1.NetApp' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.netapp.v1.NetApp, + 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 netAppStubMethods = [ + 'listStoragePools', + 'createStoragePool', + 'getStoragePool', + 'updateStoragePool', + 'deleteStoragePool', + 'listVolumes', + 'getVolume', + 'createVolume', + 'updateVolume', + 'deleteVolume', + 'revertVolume', + 'listSnapshots', + 'getSnapshot', + 'createSnapshot', + 'deleteSnapshot', + 'updateSnapshot', + 'listActiveDirectories', + 'getActiveDirectory', + 'createActiveDirectory', + 'updateActiveDirectory', + 'deleteActiveDirectory', + 'listKmsConfigs', + 'createKmsConfig', + 'getKmsConfig', + 'updateKmsConfig', + 'encryptVolumes', + 'verifyKmsConfig', + 'deleteKmsConfig', + 'listReplications', + 'getReplication', + 'createReplication', + 'deleteReplication', + 'updateReplication', + 'stopReplication', + 'resumeReplication', + 'reverseReplicationDirection', + ]; + for (const methodName of netAppStubMethods) { + const callPromise = this.netAppStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.netAppStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'netapp.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 'netapp.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 -- + // ------------------- + /** + * Returns the description of the specified storage pool by poolId. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the storage pool + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.netapp.v1.StoragePool|StoragePool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.get_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_GetStoragePool_async + */ + getStoragePool( + request?: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest | undefined, + {} | undefined, + ] + >; + getStoragePool( + request: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest | null | undefined, + {} | null | undefined + > + ): void; + getStoragePool( + request: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest | null | undefined, + {} | null | undefined + > + ): void; + getStoragePool( + request?: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.netapp.v1.IStoragePool, + | protos.google.cloud.netapp.v1.IGetStoragePoolRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getStoragePool(request, options, callback); + } + /** + * Gets details of a single Volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the volume + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.netapp.v1.Volume|Volume}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.get_volume.js + * region_tag:netapp_v1_generated_NetApp_GetVolume_async + */ + getVolume( + request?: protos.google.cloud.netapp.v1.IGetVolumeRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest | undefined, + {} | undefined, + ] + >; + getVolume( + request: protos.google.cloud.netapp.v1.IGetVolumeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest | null | undefined, + {} | null | undefined + > + ): void; + getVolume( + request: protos.google.cloud.netapp.v1.IGetVolumeRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest | null | undefined, + {} | null | undefined + > + ): void; + getVolume( + request?: protos.google.cloud.netapp.v1.IGetVolumeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getVolume(request, options, callback); + } + /** + * Describe a snapshot for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.netapp.v1.Snapshot|Snapshot}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.get_snapshot.js + * region_tag:netapp_v1_generated_NetApp_GetSnapshot_async + */ + getSnapshot( + request?: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest | undefined, + {} | undefined, + ] + >; + getSnapshot( + request: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest | null | undefined, + {} | null | undefined + > + ): void; + getSnapshot( + request: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + callback: Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest | null | undefined, + {} | null | undefined + > + ): void; + getSnapshot( + request?: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getSnapshot(request, options, callback); + } + /** + * Describes a specified active directory. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the active directory. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.netapp.v1.ActiveDirectory|ActiveDirectory}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.get_active_directory.js + * region_tag:netapp_v1_generated_NetApp_GetActiveDirectory_async + */ + getActiveDirectory( + request?: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest | undefined, + {} | undefined, + ] + >; + getActiveDirectory( + request: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + | protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getActiveDirectory( + request: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + | protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getActiveDirectory( + request?: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + | protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + | protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getActiveDirectory(request, options, callback); + } + /** + * Returns the description of the specified KMS config by kms_config_id. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KmsConfig + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.netapp.v1.KmsConfig|KmsConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.get_kms_config.js + * region_tag:netapp_v1_generated_NetApp_GetKmsConfig_async + */ + getKmsConfig( + request?: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest | undefined, + {} | undefined, + ] + >; + getKmsConfig( + request: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest | null | undefined, + {} | null | undefined + > + ): void; + getKmsConfig( + request: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest | null | undefined, + {} | null | undefined + > + ): void; + getKmsConfig( + request?: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getKmsConfig(request, options, callback); + } + /** + * Verifies KMS config reachability. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KMS Config to be verified. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.netapp.v1.VerifyKmsConfigResponse|VerifyKmsConfigResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.verify_kms_config.js + * region_tag:netapp_v1_generated_NetApp_VerifyKmsConfig_async + */ + verifyKmsConfig( + request?: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest | undefined, + {} | undefined, + ] + >; + verifyKmsConfig( + request: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest | null | undefined, + {} | null | undefined + > + ): void; + verifyKmsConfig( + request: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest | null | undefined, + {} | null | undefined + > + ): void; + verifyKmsConfig( + request?: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + | protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.verifyKmsConfig(request, options, callback); + } + /** + * Describe a replication for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.netapp.v1.Replication|Replication}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.get_replication.js + * region_tag:netapp_v1_generated_NetApp_GetReplication_async + */ + getReplication( + request?: protos.google.cloud.netapp.v1.IGetReplicationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest | undefined, + {} | undefined, + ] + >; + getReplication( + request: protos.google.cloud.netapp.v1.IGetReplicationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest | null | undefined, + {} | null | undefined + > + ): void; + getReplication( + request: protos.google.cloud.netapp.v1.IGetReplicationRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest | null | undefined, + {} | null | undefined + > + ): void; + getReplication( + request?: protos.google.cloud.netapp.v1.IGetReplicationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.netapp.v1.IReplication, + | protos.google.cloud.netapp.v1.IGetReplicationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getReplication(request, options, callback); + } + + /** + * Creates a new storage pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.storagePoolId + * Required. Id of the requesting storage pool + * If auto-generating Id server-side, remove this field and + * id from the method_signature of Create RPC + * @param {google.cloud.netapp.v1.StoragePool} request.storagePool + * Required. The required parameters to create a new storage pool. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_CreateStoragePool_async + */ + createStoragePool( + request?: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createStoragePool( + request: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createStoragePool( + request: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createStoragePool( + request?: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createStoragePool(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createStoragePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_CreateStoragePool_async + */ + async checkCreateStoragePoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.StoragePool, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createStoragePool, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.StoragePool, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Updates the storage pool properties with the full spec + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.netapp.v1.StoragePool} request.storagePool + * Required. The pool being 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_UpdateStoragePool_async + */ + updateStoragePool( + request?: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateStoragePool( + request: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateStoragePool( + request: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateStoragePool( + request?: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'storage_pool.name': request.storagePool!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateStoragePool(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateStoragePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_UpdateStoragePool_async + */ + async checkUpdateStoragePoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.StoragePool, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateStoragePool, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.StoragePool, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Warning! This operation will permanently delete the storage pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the storage pool + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_DeleteStoragePool_async + */ + deleteStoragePool( + request?: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteStoragePool( + request: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteStoragePool( + request: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteStoragePool( + request?: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteStoragePool(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteStoragePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_DeleteStoragePool_async + */ + async checkDeleteStoragePoolProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteStoragePool, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Creates a new Volume in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.volumeId + * Required. Id of the requesting volume + * If auto-generating Id server-side, remove this field and + * Id from the method_signature of Create RPC + * @param {google.cloud.netapp.v1.Volume} request.volume + * Required. The volume being created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_volume.js + * region_tag:netapp_v1_generated_NetApp_CreateVolume_async + */ + createVolume( + request?: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createVolume( + request: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createVolume( + request: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createVolume( + request?: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createVolume(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createVolume()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_volume.js + * region_tag:netapp_v1_generated_NetApp_CreateVolume_async + */ + async checkCreateVolumeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Volume, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createVolume, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Volume, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Updates the parameters of a single Volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.netapp.v1.Volume} request.volume + * Required. The volume being 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_volume.js + * region_tag:netapp_v1_generated_NetApp_UpdateVolume_async + */ + updateVolume( + request?: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateVolume( + request: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateVolume( + request: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateVolume( + request?: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'volume.name': request.volume!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateVolume(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateVolume()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_volume.js + * region_tag:netapp_v1_generated_NetApp_UpdateVolume_async + */ + async checkUpdateVolumeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Volume, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateVolume, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Volume, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Deletes a single Volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the volume + * @param {boolean} request.force + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_volume.js + * region_tag:netapp_v1_generated_NetApp_DeleteVolume_async + */ + deleteVolume( + request?: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteVolume( + request: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteVolume( + request: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteVolume( + request?: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteVolume(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteVolume()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_volume.js + * region_tag:netapp_v1_generated_NetApp_DeleteVolume_async + */ + async checkDeleteVolumeProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteVolume, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Revert an existing volume to a specified snapshot. + * Warning! This operation will permanently revert all changes made after the + * snapshot was created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * @param {string} request.snapshotId + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.revert_volume.js + * region_tag:netapp_v1_generated_NetApp_RevertVolume_async + */ + revertVolume( + request?: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + revertVolume( + request: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + revertVolume( + request: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + revertVolume( + request?: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.revertVolume(request, options, callback); + } + /** + * Check the status of the long running operation returned by `revertVolume()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.revert_volume.js + * region_tag:netapp_v1_generated_NetApp_RevertVolume_async + */ + async checkRevertVolumeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Volume, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.revertVolume, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Volume, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Create a new snapshot for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @param {google.cloud.netapp.v1.Snapshot} request.snapshot + * Required. A snapshot resource + * @param {string} request.snapshotId + * Required. ID of the snapshot to create. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_snapshot.js + * region_tag:netapp_v1_generated_NetApp_CreateSnapshot_async + */ + createSnapshot( + request?: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createSnapshot( + request: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createSnapshot( + request: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createSnapshot( + request?: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createSnapshot(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createSnapshot()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_snapshot.js + * region_tag:netapp_v1_generated_NetApp_CreateSnapshot_async + */ + async checkCreateSnapshotProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Snapshot, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createSnapshot, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Snapshot, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Deletes a snapshot. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The snapshot resource name, in the format + * `projects/* /locations/* /volumes/* /snapshots/{snapshot_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_snapshot.js + * region_tag:netapp_v1_generated_NetApp_DeleteSnapshot_async + */ + deleteSnapshot( + request?: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteSnapshot( + request: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSnapshot( + request: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSnapshot( + request?: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteSnapshot(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteSnapshot()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_snapshot.js + * region_tag:netapp_v1_generated_NetApp_DeleteSnapshot_async + */ + async checkDeleteSnapshotProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteSnapshot, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Updates the settings of a specific snapshot. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.netapp.v1.Snapshot} request.snapshot + * Required. A snapshot resource + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_snapshot.js + * region_tag:netapp_v1_generated_NetApp_UpdateSnapshot_async + */ + updateSnapshot( + request?: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateSnapshot( + request: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateSnapshot( + request: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateSnapshot( + request?: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'snapshot.name': request.snapshot!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateSnapshot(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateSnapshot()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_snapshot.js + * region_tag:netapp_v1_generated_NetApp_UpdateSnapshot_async + */ + async checkUpdateSnapshotProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Snapshot, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateSnapshot, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Snapshot, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * CreateActiveDirectory + * Creates the active directory specified in the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {google.cloud.netapp.v1.ActiveDirectory} request.activeDirectory + * Required. Fields of the to be created active directory. + * @param {string} request.activeDirectoryId + * Required. ID of the active directory 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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_active_directory.js + * region_tag:netapp_v1_generated_NetApp_CreateActiveDirectory_async + */ + createActiveDirectory( + request?: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createActiveDirectory( + request: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createActiveDirectory( + request: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createActiveDirectory( + request?: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createActiveDirectory(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createActiveDirectory()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_active_directory.js + * region_tag:netapp_v1_generated_NetApp_CreateActiveDirectory_async + */ + async checkCreateActiveDirectoryProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.ActiveDirectory, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createActiveDirectory, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.ActiveDirectory, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Update the parameters of an active directories. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.netapp.v1.ActiveDirectory} request.activeDirectory + * Required. The volume being 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_active_directory.js + * region_tag:netapp_v1_generated_NetApp_UpdateActiveDirectory_async + */ + updateActiveDirectory( + request?: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateActiveDirectory( + request: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateActiveDirectory( + request: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateActiveDirectory( + request?: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'active_directory.name': request.activeDirectory!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateActiveDirectory(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateActiveDirectory()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_active_directory.js + * region_tag:netapp_v1_generated_NetApp_UpdateActiveDirectory_async + */ + async checkUpdateActiveDirectoryProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.ActiveDirectory, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateActiveDirectory, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.ActiveDirectory, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Delete the active directory specified in the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the active directory. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_active_directory.js + * region_tag:netapp_v1_generated_NetApp_DeleteActiveDirectory_async + */ + deleteActiveDirectory( + request?: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteActiveDirectory( + request: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteActiveDirectory( + request: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteActiveDirectory( + request?: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteActiveDirectory(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteActiveDirectory()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_active_directory.js + * region_tag:netapp_v1_generated_NetApp_DeleteActiveDirectory_async + */ + async checkDeleteActiveDirectoryProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteActiveDirectory, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Creates a new KMS config. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.kmsConfigId + * Required. Id of the requesting KmsConfig + * If auto-generating Id server-side, remove this field and + * id from the method_signature of Create RPC + * @param {google.cloud.netapp.v1.KmsConfig} request.kmsConfig + * Required. The required parameters to create a new KmsConfig. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_kms_config.js + * region_tag:netapp_v1_generated_NetApp_CreateKmsConfig_async + */ + createKmsConfig( + request?: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createKmsConfig( + request: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createKmsConfig( + request: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createKmsConfig( + request?: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createKmsConfig(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createKmsConfig()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_kms_config.js + * region_tag:netapp_v1_generated_NetApp_CreateKmsConfig_async + */ + async checkCreateKmsConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.KmsConfig, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createKmsConfig, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.KmsConfig, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Updates the Kms config properties with the full spec + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.netapp.v1.KmsConfig} request.kmsConfig + * Required. The KmsConfig being 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_kms_config.js + * region_tag:netapp_v1_generated_NetApp_UpdateKmsConfig_async + */ + updateKmsConfig( + request?: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateKmsConfig( + request: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateKmsConfig( + request: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateKmsConfig( + request?: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'kms_config.name': request.kmsConfig!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateKmsConfig(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateKmsConfig()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_kms_config.js + * region_tag:netapp_v1_generated_NetApp_UpdateKmsConfig_async + */ + async checkUpdateKmsConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.KmsConfig, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateKmsConfig, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.KmsConfig, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Encrypt the existing volumes without CMEK encryption with the desired the + * KMS config for the whole region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KmsConfig. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.encrypt_volumes.js + * region_tag:netapp_v1_generated_NetApp_EncryptVolumes_async + */ + encryptVolumes( + request?: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + encryptVolumes( + request: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + encryptVolumes( + request: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + encryptVolumes( + request?: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.encryptVolumes(request, options, callback); + } + /** + * Check the status of the long running operation returned by `encryptVolumes()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.encrypt_volumes.js + * region_tag:netapp_v1_generated_NetApp_EncryptVolumes_async + */ + async checkEncryptVolumesProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.KmsConfig, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.encryptVolumes, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.KmsConfig, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Warning! This operation will permanently delete the Kms config. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KmsConfig. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_kms_config.js + * region_tag:netapp_v1_generated_NetApp_DeleteKmsConfig_async + */ + deleteKmsConfig( + request?: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteKmsConfig( + request: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteKmsConfig( + request: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteKmsConfig( + request?: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteKmsConfig(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteKmsConfig()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_kms_config.js + * region_tag:netapp_v1_generated_NetApp_DeleteKmsConfig_async + */ + async checkDeleteKmsConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteKmsConfig, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Create a new replication for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @param {google.cloud.netapp.v1.Replication} request.replication + * Required. A replication resource + * @param {string} request.replicationId + * Required. ID of the replication to create. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_replication.js + * region_tag:netapp_v1_generated_NetApp_CreateReplication_async + */ + createReplication( + request?: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createReplication( + request: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createReplication( + request: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createReplication( + request?: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createReplication(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createReplication()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.create_replication.js + * region_tag:netapp_v1_generated_NetApp_CreateReplication_async + */ + async checkCreateReplicationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createReplication, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Deletes a replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The replication resource name, in the format + * `projects/* /locations/* /volumes/* /replications/{replication_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_replication.js + * region_tag:netapp_v1_generated_NetApp_DeleteReplication_async + */ + deleteReplication( + request?: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteReplication( + request: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteReplication( + request: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteReplication( + request?: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteReplication(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteReplication()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.delete_replication.js + * region_tag:netapp_v1_generated_NetApp_DeleteReplication_async + */ + async checkDeleteReplicationProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteReplication, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Updates the settings of a specific replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.netapp.v1.Replication} request.replication + * Required. A replication resource + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_replication.js + * region_tag:netapp_v1_generated_NetApp_UpdateReplication_async + */ + updateReplication( + request?: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateReplication( + request: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateReplication( + request: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateReplication( + request?: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'replication.name': request.replication!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateReplication(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateReplication()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.update_replication.js + * region_tag:netapp_v1_generated_NetApp_UpdateReplication_async + */ + async checkUpdateReplicationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateReplication, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Stop Cross Region Replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @param {boolean} request.force + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.stop_replication.js + * region_tag:netapp_v1_generated_NetApp_StopReplication_async + */ + stopReplication( + request?: protos.google.cloud.netapp.v1.IStopReplicationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + stopReplication( + request: protos.google.cloud.netapp.v1.IStopReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + stopReplication( + request: protos.google.cloud.netapp.v1.IStopReplicationRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + stopReplication( + request?: protos.google.cloud.netapp.v1.IStopReplicationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.stopReplication(request, options, callback); + } + /** + * Check the status of the long running operation returned by `stopReplication()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.stop_replication.js + * region_tag:netapp_v1_generated_NetApp_StopReplication_async + */ + async checkStopReplicationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.stopReplication, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Resume Cross Region Replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.resume_replication.js + * region_tag:netapp_v1_generated_NetApp_ResumeReplication_async + */ + resumeReplication( + request?: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + resumeReplication( + request: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + resumeReplication( + request: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + resumeReplication( + request?: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.resumeReplication(request, options, callback); + } + /** + * Check the status of the long running operation returned by `resumeReplication()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.resume_replication.js + * region_tag:netapp_v1_generated_NetApp_ResumeReplication_async + */ + async checkResumeReplicationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.resumeReplication, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Reverses direction of replication. Source becomes destination and + * destination becomes source. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.reverse_replication_direction.js + * region_tag:netapp_v1_generated_NetApp_ReverseReplicationDirection_async + */ + reverseReplicationDirection( + request?: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + reverseReplicationDirection( + request: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + reverseReplicationDirection( + request: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + callback: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + reverseReplicationDirection( + request?: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.reverseReplicationDirection( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `reverseReplicationDirection()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.reverse_replication_direction.js + * region_tag:netapp_v1_generated_NetApp_ReverseReplicationDirection_async + */ + async checkReverseReplicationDirectionProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.reverseReplicationDirection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.netapp.v1.Replication, + protos.google.cloud.netapp.v1.OperationMetadata + >; + } + /** + * Returns descriptions of all storage pools owned by the caller. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.netapp.v1.StoragePool|StoragePool}. + * 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 `listStoragePoolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listStoragePools( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IStoragePool[], + protos.google.cloud.netapp.v1.IListStoragePoolsRequest | null, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse, + ] + >; + listStoragePools( + request: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + | protos.google.cloud.netapp.v1.IListStoragePoolsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IStoragePool + > + ): void; + listStoragePools( + request: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + | protos.google.cloud.netapp.v1.IListStoragePoolsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IStoragePool + > + ): void; + listStoragePools( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + | protos.google.cloud.netapp.v1.IListStoragePoolsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IStoragePool + >, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + | protos.google.cloud.netapp.v1.IListStoragePoolsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IStoragePool + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IStoragePool[], + protos.google.cloud.netapp.v1.IListStoragePoolsRequest | null, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listStoragePools(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. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.netapp.v1.StoragePool|StoragePool} 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 `listStoragePoolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listStoragePoolsStream( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listStoragePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listStoragePools.createStream( + this.innerApiCalls.listStoragePools as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listStoragePools`, 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. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.netapp.v1.StoragePool|StoragePool}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.list_storage_pools.js + * region_tag:netapp_v1_generated_NetApp_ListStoragePools_async + */ + listStoragePoolsAsync( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listStoragePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listStoragePools.asyncIterate( + this.innerApiCalls['listStoragePools'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Volumes in a given project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListVolumesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.netapp.v1.Volume|Volume}. + * 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 `listVolumesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listVolumes( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IVolume[], + protos.google.cloud.netapp.v1.IListVolumesRequest | null, + protos.google.cloud.netapp.v1.IListVolumesResponse, + ] + >; + listVolumes( + request: protos.google.cloud.netapp.v1.IListVolumesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse | null | undefined, + protos.google.cloud.netapp.v1.IVolume + > + ): void; + listVolumes( + request: protos.google.cloud.netapp.v1.IListVolumesRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse | null | undefined, + protos.google.cloud.netapp.v1.IVolume + > + ): void; + listVolumes( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse | null | undefined, + protos.google.cloud.netapp.v1.IVolume + >, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse | null | undefined, + protos.google.cloud.netapp.v1.IVolume + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IVolume[], + protos.google.cloud.netapp.v1.IListVolumesRequest | null, + protos.google.cloud.netapp.v1.IListVolumesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listVolumes(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. Parent value for ListVolumesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.netapp.v1.Volume|Volume} 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 `listVolumesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listVolumesStream( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVolumes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVolumes.createStream( + this.innerApiCalls.listVolumes as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listVolumes`, 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. Parent value for ListVolumesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.netapp.v1.Volume|Volume}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.list_volumes.js + * region_tag:netapp_v1_generated_NetApp_ListVolumes_async + */ + listVolumesAsync( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVolumes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVolumes.asyncIterate( + this.innerApiCalls['listVolumes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns descriptions of all snapshots for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.netapp.v1.Snapshot|Snapshot}. + * 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 `listSnapshotsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSnapshots( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.ISnapshot[], + protos.google.cloud.netapp.v1.IListSnapshotsRequest | null, + protos.google.cloud.netapp.v1.IListSnapshotsResponse, + ] + >; + listSnapshots( + request: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse | null | undefined, + protos.google.cloud.netapp.v1.ISnapshot + > + ): void; + listSnapshots( + request: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse | null | undefined, + protos.google.cloud.netapp.v1.ISnapshot + > + ): void; + listSnapshots( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + | protos.google.cloud.netapp.v1.IListSnapshotsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.ISnapshot + >, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse | null | undefined, + protos.google.cloud.netapp.v1.ISnapshot + > + ): Promise< + [ + protos.google.cloud.netapp.v1.ISnapshot[], + protos.google.cloud.netapp.v1.IListSnapshotsRequest | null, + protos.google.cloud.netapp.v1.IListSnapshotsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listSnapshots(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 volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.netapp.v1.Snapshot|Snapshot} 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 `listSnapshotsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listSnapshotsStream( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSnapshots']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSnapshots.createStream( + this.innerApiCalls.listSnapshots as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listSnapshots`, 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 volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.netapp.v1.Snapshot|Snapshot}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.list_snapshots.js + * region_tag:netapp_v1_generated_NetApp_ListSnapshots_async + */ + listSnapshotsAsync( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSnapshots']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSnapshots.asyncIterate( + this.innerApiCalls['listSnapshots'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists active directories. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListActiveDirectoriesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.netapp.v1.ActiveDirectory|ActiveDirectory}. + * 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 `listActiveDirectoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listActiveDirectories( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IActiveDirectory[], + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest | null, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse, + ] + >; + listActiveDirectories( + request: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + | protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IActiveDirectory + > + ): void; + listActiveDirectories( + request: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + | protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IActiveDirectory + > + ): void; + listActiveDirectories( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + | protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IActiveDirectory + >, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + | protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IActiveDirectory + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IActiveDirectory[], + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest | null, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listActiveDirectories(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. Parent value for ListActiveDirectoriesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.netapp.v1.ActiveDirectory|ActiveDirectory} 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 `listActiveDirectoriesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listActiveDirectoriesStream( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listActiveDirectories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listActiveDirectories.createStream( + this.innerApiCalls.listActiveDirectories as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listActiveDirectories`, 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. Parent value for ListActiveDirectoriesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.netapp.v1.ActiveDirectory|ActiveDirectory}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.list_active_directories.js + * region_tag:netapp_v1_generated_NetApp_ListActiveDirectories_async + */ + listActiveDirectoriesAsync( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listActiveDirectories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listActiveDirectories.asyncIterate( + this.innerApiCalls['listActiveDirectories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns descriptions of all KMS configs owned by the caller. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.netapp.v1.KmsConfig|KmsConfig}. + * 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 `listKmsConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listKmsConfigs( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IKmsConfig[], + protos.google.cloud.netapp.v1.IListKmsConfigsRequest | null, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse, + ] + >; + listKmsConfigs( + request: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse | null | undefined, + protos.google.cloud.netapp.v1.IKmsConfig + > + ): void; + listKmsConfigs( + request: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse | null | undefined, + protos.google.cloud.netapp.v1.IKmsConfig + > + ): void; + listKmsConfigs( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + | protos.google.cloud.netapp.v1.IListKmsConfigsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IKmsConfig + >, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse | null | undefined, + protos.google.cloud.netapp.v1.IKmsConfig + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IKmsConfig[], + protos.google.cloud.netapp.v1.IListKmsConfigsRequest | null, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listKmsConfigs(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. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.netapp.v1.KmsConfig|KmsConfig} 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 `listKmsConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listKmsConfigsStream( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listKmsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listKmsConfigs.createStream( + this.innerApiCalls.listKmsConfigs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listKmsConfigs`, 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. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.netapp.v1.KmsConfig|KmsConfig}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.list_kms_configs.js + * region_tag:netapp_v1_generated_NetApp_ListKmsConfigs_async + */ + listKmsConfigsAsync( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listKmsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listKmsConfigs.asyncIterate( + this.innerApiCalls['listKmsConfigs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns descriptions of all replications for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.netapp.v1.Replication|Replication}. + * 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 `listReplicationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReplications( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.netapp.v1.IReplication[], + protos.google.cloud.netapp.v1.IListReplicationsRequest | null, + protos.google.cloud.netapp.v1.IListReplicationsResponse, + ] + >; + listReplications( + request: protos.google.cloud.netapp.v1.IListReplicationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + | protos.google.cloud.netapp.v1.IListReplicationsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IReplication + > + ): void; + listReplications( + request: protos.google.cloud.netapp.v1.IListReplicationsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + | protos.google.cloud.netapp.v1.IListReplicationsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IReplication + > + ): void; + listReplications( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + | protos.google.cloud.netapp.v1.IListReplicationsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IReplication + >, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + | protos.google.cloud.netapp.v1.IListReplicationsResponse + | null + | undefined, + protos.google.cloud.netapp.v1.IReplication + > + ): Promise< + [ + protos.google.cloud.netapp.v1.IReplication[], + protos.google.cloud.netapp.v1.IListReplicationsRequest | null, + protos.google.cloud.netapp.v1.IListReplicationsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listReplications(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 volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.netapp.v1.Replication|Replication} 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 `listReplicationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReplicationsStream( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReplications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReplications.createStream( + this.innerApiCalls.listReplications as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listReplications`, 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 volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.netapp.v1.Replication|Replication}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/net_app.list_replications.js + * region_tag:netapp_v1_generated_NetApp_ListReplications_async + */ + listReplicationsAsync( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReplications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReplications.asyncIterate( + this.innerApiCalls['listReplications'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified activeDirectory resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} active_directory + * @returns {string} Resource name string. + */ + activeDirectoryPath( + project: string, + location: string, + activeDirectory: string + ) { + return this.pathTemplates.activeDirectoryPathTemplate.render({ + project: project, + location: location, + active_directory: activeDirectory, + }); + } + + /** + * Parse the project from ActiveDirectory resource. + * + * @param {string} activeDirectoryName + * A fully-qualified path representing ActiveDirectory resource. + * @returns {string} A string representing the project. + */ + matchProjectFromActiveDirectoryName(activeDirectoryName: string) { + return this.pathTemplates.activeDirectoryPathTemplate.match( + activeDirectoryName + ).project; + } + + /** + * Parse the location from ActiveDirectory resource. + * + * @param {string} activeDirectoryName + * A fully-qualified path representing ActiveDirectory resource. + * @returns {string} A string representing the location. + */ + matchLocationFromActiveDirectoryName(activeDirectoryName: string) { + return this.pathTemplates.activeDirectoryPathTemplate.match( + activeDirectoryName + ).location; + } + + /** + * Parse the active_directory from ActiveDirectory resource. + * + * @param {string} activeDirectoryName + * A fully-qualified path representing ActiveDirectory resource. + * @returns {string} A string representing the active_directory. + */ + matchActiveDirectoryFromActiveDirectoryName(activeDirectoryName: string) { + return this.pathTemplates.activeDirectoryPathTemplate.match( + activeDirectoryName + ).active_directory; + } + + /** + * Return a fully-qualified kmsConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} kms_config + * @returns {string} Resource name string. + */ + kmsConfigPath(project: string, location: string, kmsConfig: string) { + return this.pathTemplates.kmsConfigPathTemplate.render({ + project: project, + location: location, + kms_config: kmsConfig, + }); + } + + /** + * Parse the project from KmsConfig resource. + * + * @param {string} kmsConfigName + * A fully-qualified path representing KmsConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromKmsConfigName(kmsConfigName: string) { + return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName) + .project; + } + + /** + * Parse the location from KmsConfig resource. + * + * @param {string} kmsConfigName + * A fully-qualified path representing KmsConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromKmsConfigName(kmsConfigName: string) { + return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName) + .location; + } + + /** + * Parse the kms_config from KmsConfig resource. + * + * @param {string} kmsConfigName + * A fully-qualified path representing KmsConfig resource. + * @returns {string} A string representing the kms_config. + */ + matchKmsConfigFromKmsConfigName(kmsConfigName: string) { + return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName) + .kms_config; + } + + /** + * Return a fully-qualified replication resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} volume + * @param {string} replication + * @returns {string} Resource name string. + */ + replicationPath( + project: string, + location: string, + volume: string, + replication: string + ) { + return this.pathTemplates.replicationPathTemplate.render({ + project: project, + location: location, + volume: volume, + replication: replication, + }); + } + + /** + * Parse the project from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName) + .project; + } + + /** + * Parse the location from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName) + .location; + } + + /** + * Parse the volume from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the volume. + */ + matchVolumeFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName) + .volume; + } + + /** + * Parse the replication from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the replication. + */ + matchReplicationFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName) + .replication; + } + + /** + * Return a fully-qualified snapshot resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} volume + * @param {string} snapshot + * @returns {string} Resource name string. + */ + snapshotPath( + project: string, + location: string, + volume: string, + snapshot: string + ) { + return this.pathTemplates.snapshotPathTemplate.render({ + project: project, + location: location, + volume: volume, + snapshot: snapshot, + }); + } + + /** + * Parse the project from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).project; + } + + /** + * Parse the location from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).location; + } + + /** + * Parse the volume from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the volume. + */ + matchVolumeFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).volume; + } + + /** + * Parse the snapshot from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the snapshot. + */ + matchSnapshotFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).snapshot; + } + + /** + * Return a fully-qualified storagePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} storage_pool + * @returns {string} Resource name string. + */ + storagePoolPath(project: string, location: string, storagePool: string) { + return this.pathTemplates.storagePoolPathTemplate.render({ + project: project, + location: location, + storage_pool: storagePool, + }); + } + + /** + * Parse the project from StoragePool resource. + * + * @param {string} storagePoolName + * A fully-qualified path representing StoragePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromStoragePoolName(storagePoolName: string) { + return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName) + .project; + } + + /** + * Parse the location from StoragePool resource. + * + * @param {string} storagePoolName + * A fully-qualified path representing StoragePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromStoragePoolName(storagePoolName: string) { + return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName) + .location; + } + + /** + * Parse the storage_pool from StoragePool resource. + * + * @param {string} storagePoolName + * A fully-qualified path representing StoragePool resource. + * @returns {string} A string representing the storage_pool. + */ + matchStoragePoolFromStoragePoolName(storagePoolName: string) { + return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName) + .storage_pool; + } + + /** + * Return a fully-qualified volume resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} volume + * @returns {string} Resource name string. + */ + volumePath(project: string, location: string, volume: string) { + return this.pathTemplates.volumePathTemplate.render({ + project: project, + location: location, + volume: volume, + }); + } + + /** + * Parse the project from Volume resource. + * + * @param {string} volumeName + * A fully-qualified path representing Volume resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVolumeName(volumeName: string) { + return this.pathTemplates.volumePathTemplate.match(volumeName).project; + } + + /** + * Parse the location from Volume resource. + * + * @param {string} volumeName + * A fully-qualified path representing Volume resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVolumeName(volumeName: string) { + return this.pathTemplates.volumePathTemplate.match(volumeName).location; + } + + /** + * Parse the volume from Volume resource. + * + * @param {string} volumeName + * A fully-qualified path representing Volume resource. + * @returns {string} A string representing the volume. + */ + matchVolumeFromVolumeName(volumeName: string) { + return this.pathTemplates.volumePathTemplate.match(volumeName).volume; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.netAppStub && !this._terminated) { + return this.netAppStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-netapp/src/v1/net_app_client_config.json b/packages/google-cloud-netapp/src/v1/net_app_client_config.json new file mode 100644 index 000000000000..78a5055a2dd5 --- /dev/null +++ b/packages/google-cloud-netapp/src/v1/net_app_client_config.json @@ -0,0 +1,218 @@ +{ + "interfaces": { + "google.cloud.netapp.v1.NetApp": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListStoragePools": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetVolume": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RevertVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListActiveDirectories": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListKmsConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "EncryptVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "VerifyKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListReplications": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetReplication": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StopReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResumeReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReverseReplicationDirection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-netapp/src/v1/net_app_proto_list.json b/packages/google-cloud-netapp/src/v1/net_app_proto_list.json new file mode 100644 index 000000000000..f7426286ea7f --- /dev/null +++ b/packages/google-cloud-netapp/src/v1/net_app_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/cloud/netapp/v1/active_directory.proto", + "../../protos/google/cloud/netapp/v1/cloud_netapp_service.proto", + "../../protos/google/cloud/netapp/v1/common.proto", + "../../protos/google/cloud/netapp/v1/kms.proto", + "../../protos/google/cloud/netapp/v1/replication.proto", + "../../protos/google/cloud/netapp/v1/snapshot.proto", + "../../protos/google/cloud/netapp/v1/storage_pool.proto", + "../../protos/google/cloud/netapp/v1/volume.proto" +] diff --git a/packages/google-cloud-netapp/system-test/fixtures/sample/src/index.js b/packages/google-cloud-netapp/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..080525cb879d --- /dev/null +++ b/packages/google-cloud-netapp/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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 netapp = require('@google-cloud/netapp'); + +function main() { + const netAppClient = new netapp.NetAppClient(); +} + +main(); diff --git a/packages/google-cloud-netapp/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-netapp/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..6c2b064efca1 --- /dev/null +++ b/packages/google-cloud-netapp/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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 {NetAppClient} from '@google-cloud/netapp'; + +// check that the client class type name can be used +function doStuffWithNetAppClient(client: NetAppClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const netAppClient = new NetAppClient(); + doStuffWithNetAppClient(netAppClient); +} + +main(); diff --git a/packages/google-cloud-netapp/system-test/install.ts b/packages/google-cloud-netapp/system-test/install.ts new file mode 100644 index 000000000000..f61fe236476b --- /dev/null +++ b/packages/google-cloud-netapp/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-netapp/test/gapic_net_app_v1.ts b/packages/google-cloud-netapp/test/gapic_net_app_v1.ts new file mode 100644 index 000000000000..116cb652d652 --- /dev/null +++ b/packages/google-cloud-netapp/test/gapic_net_app_v1.ts @@ -0,0 +1,8421 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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 netappModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.NetAppClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = netappModule.v1.NetAppClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = netappModule.v1.NetAppClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = netappModule.v1.NetAppClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new netappModule.v1.NetAppClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new netappModule.v1.NetAppClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.netAppStub, undefined); + await client.initialize(); + assert(client.netAppStub); + }); + + it('has close method for the initialized client', done => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.netAppStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.netAppStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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('getStoragePool', () => { + it('invokes getStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.StoragePool() + ); + client.innerApiCalls.getStoragePool = stubSimpleCall(expectedResponse); + const [response] = await client.getStoragePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.StoragePool() + ); + client.innerApiCalls.getStoragePool = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getStoragePool( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IStoragePool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoragePool with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getStoragePool = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getStoragePool(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoragePool with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getStoragePool(request), expectedError); + }); + }); + + describe('getVolume', () => { + it('invokes getVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Volume() + ); + client.innerApiCalls.getVolume = stubSimpleCall(expectedResponse); + const [response] = await client.getVolume(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Volume() + ); + client.innerApiCalls.getVolume = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVolume( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IVolume | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVolume with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVolume = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVolume(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVolume with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVolume(request), expectedError); + }); + }); + + describe('getSnapshot', () => { + it('invokes getSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Snapshot() + ); + client.innerApiCalls.getSnapshot = stubSimpleCall(expectedResponse); + const [response] = await client.getSnapshot(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Snapshot() + ); + client.innerApiCalls.getSnapshot = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSnapshot( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.ISnapshot | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSnapshot = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getSnapshot(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSnapshot(request), expectedError); + }); + }); + + describe('getActiveDirectory', () => { + it('invokes getActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ); + client.innerApiCalls.getActiveDirectory = + stubSimpleCall(expectedResponse); + const [response] = await client.getActiveDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ); + client.innerApiCalls.getActiveDirectory = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getActiveDirectory( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IActiveDirectory | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getActiveDirectory with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getActiveDirectory = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getActiveDirectory(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getActiveDirectory with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getActiveDirectory(request), expectedError); + }); + }); + + describe('getKmsConfig', () => { + it('invokes getKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.KmsConfig() + ); + client.innerApiCalls.getKmsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getKmsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.KmsConfig() + ); + client.innerApiCalls.getKmsConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getKmsConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IKmsConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getKmsConfig with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getKmsConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getKmsConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getKmsConfig with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getKmsConfig(request), expectedError); + }); + }); + + describe('verifyKmsConfig', () => { + it('invokes verifyKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.VerifyKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigResponse() + ); + client.innerApiCalls.verifyKmsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.verifyKmsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.VerifyKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigResponse() + ); + client.innerApiCalls.verifyKmsConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.verifyKmsConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyKmsConfig with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.VerifyKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.verifyKmsConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.verifyKmsConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.verifyKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyKmsConfig with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.VerifyKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.verifyKmsConfig(request), expectedError); + }); + }); + + describe('getReplication', () => { + it('invokes getReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Replication() + ); + client.innerApiCalls.getReplication = stubSimpleCall(expectedResponse); + const [response] = await client.getReplication(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Replication() + ); + client.innerApiCalls.getReplication = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReplication( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IReplication | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReplication with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReplication = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getReplication(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReplication with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.GetReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReplication(request), expectedError); + }); + }); + + describe('createStoragePool', () => { + it('invokes createStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateStoragePoolRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createStoragePool = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createStoragePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateStoragePoolRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createStoragePool = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createStoragePool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoragePool with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateStoragePoolRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createStoragePool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createStoragePool(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoragePool with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateStoragePoolRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createStoragePool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createStoragePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateStoragePoolProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateStoragePoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateStoragePoolProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateStoragePoolProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateStoragePool', () => { + it('invokes updateStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateStoragePoolRequest', + ['storagePool', 'name'] + ); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateStoragePool = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateStoragePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateStoragePoolRequest', + ['storagePool', 'name'] + ); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateStoragePool = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateStoragePool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoragePool with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateStoragePoolRequest', + ['storagePool', 'name'] + ); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateStoragePool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateStoragePool(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoragePool with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateStoragePoolRequest', + ['storagePool', 'name'] + ); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateStoragePool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateStoragePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateStoragePoolProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateStoragePoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateStoragePoolProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateStoragePoolProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteStoragePool', () => { + it('invokes deleteStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteStoragePool = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteStoragePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteStoragePool = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteStoragePool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoragePool with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteStoragePool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteStoragePool(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoragePool with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteStoragePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteStoragePool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteStoragePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteStoragePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteStoragePoolProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteStoragePoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteStoragePoolProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteStoragePoolProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createVolume', () => { + it('invokes createVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateVolumeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.createVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateVolumeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVolume = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createVolume( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateVolumeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVolume = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createVolume(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateVolumeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVolume = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateVolumeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateVolume', () => { + it('invokes updateVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateVolumeRequest', + ['volume', 'name'] + ); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateVolumeRequest', + ['volume', 'name'] + ); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVolume = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateVolume( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateVolumeRequest', + ['volume', 'name'] + ); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVolume = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateVolume(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateVolumeRequest', + ['volume', 'name'] + ); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVolume = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateVolumeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteVolume', () => { + it('invokes deleteVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVolume = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVolume( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVolume = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteVolume(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVolume = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteVolumeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('revertVolume', () => { + it('invokes revertVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.RevertVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.revertVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.revertVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes revertVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.RevertVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.revertVolume = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.revertVolume( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes revertVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.RevertVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.revertVolume = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.revertVolume(request), expectedError); + const actualRequest = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes revertVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.RevertVolumeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.revertVolume = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.revertVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revertVolume as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRevertVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkRevertVolumeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRevertVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkRevertVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createSnapshot', () => { + it('invokes createSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateSnapshotRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createSnapshot = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateSnapshotRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createSnapshot = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSnapshot( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSnapshot with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateSnapshotRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSnapshot = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createSnapshot(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSnapshot with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateSnapshotRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSnapshot = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateSnapshotProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateSnapshotProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateSnapshotProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateSnapshotProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteSnapshot', () => { + it('invokes deleteSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSnapshot = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSnapshot = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSnapshot( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSnapshot = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteSnapshot(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteSnapshotRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSnapshot = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteSnapshotProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteSnapshotProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteSnapshotProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteSnapshotProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateSnapshot', () => { + it('invokes updateSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateSnapshotRequest', + ['snapshot', 'name'] + ); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSnapshot = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateSnapshotRequest', + ['snapshot', 'name'] + ); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSnapshot = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSnapshot( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSnapshot with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateSnapshotRequest', + ['snapshot', 'name'] + ); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSnapshot = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateSnapshot(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSnapshot with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateSnapshotRequest', + ['snapshot', 'name'] + ); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSnapshot = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSnapshot as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateSnapshotProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateSnapshotProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateSnapshotProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateSnapshotProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createActiveDirectory', () => { + it('invokes createActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateActiveDirectoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createActiveDirectory = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createActiveDirectory(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateActiveDirectoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createActiveDirectory = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createActiveDirectory( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createActiveDirectory with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateActiveDirectoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createActiveDirectory = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createActiveDirectory(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createActiveDirectory with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateActiveDirectoryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createActiveDirectory = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createActiveDirectory(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateActiveDirectoryProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateActiveDirectoryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateActiveDirectoryProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateActiveDirectoryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateActiveDirectory', () => { + it('invokes updateActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', + ['activeDirectory', 'name'] + ); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateActiveDirectory = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateActiveDirectory(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', + ['activeDirectory', 'name'] + ); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateActiveDirectory = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateActiveDirectory( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateActiveDirectory with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', + ['activeDirectory', 'name'] + ); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateActiveDirectory = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateActiveDirectory(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateActiveDirectory with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', + ['activeDirectory', 'name'] + ); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateActiveDirectory = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateActiveDirectory(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateActiveDirectoryProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateActiveDirectoryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateActiveDirectoryProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateActiveDirectoryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteActiveDirectory', () => { + it('invokes deleteActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteActiveDirectory = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteActiveDirectory(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteActiveDirectory = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteActiveDirectory( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteActiveDirectory with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteActiveDirectory(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteActiveDirectory with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteActiveDirectory(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteActiveDirectory as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteActiveDirectoryProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteActiveDirectoryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteActiveDirectoryProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteActiveDirectoryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createKmsConfig', () => { + it('invokes createKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateKmsConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createKmsConfig = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createKmsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateKmsConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createKmsConfig = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createKmsConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createKmsConfig with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateKmsConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createKmsConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createKmsConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createKmsConfig with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateKmsConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createKmsConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createKmsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateKmsConfigProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateKmsConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateKmsConfigProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateKmsConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateKmsConfig', () => { + it('invokes updateKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateKmsConfigRequest', + ['kmsConfig', 'name'] + ); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateKmsConfig = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateKmsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateKmsConfigRequest', + ['kmsConfig', 'name'] + ); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateKmsConfig = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateKmsConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateKmsConfig with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateKmsConfigRequest', + ['kmsConfig', 'name'] + ); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateKmsConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateKmsConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateKmsConfig with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateKmsConfigRequest', + ['kmsConfig', 'name'] + ); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateKmsConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateKmsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateKmsConfigProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateKmsConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateKmsConfigProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateKmsConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('encryptVolumes', () => { + it('invokes encryptVolumes without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.EncryptVolumesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.encryptVolumes = + stubLongRunningCall(expectedResponse); + const [operation] = await client.encryptVolumes(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes encryptVolumes without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.EncryptVolumesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.encryptVolumes = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.encryptVolumes( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes encryptVolumes with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.EncryptVolumesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.encryptVolumes = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.encryptVolumes(request), expectedError); + const actualRequest = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes encryptVolumes with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.EncryptVolumesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.encryptVolumes = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.encryptVolumes(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.encryptVolumes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkEncryptVolumesProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEncryptVolumesProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEncryptVolumesProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEncryptVolumesProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteKmsConfig', () => { + it('invokes deleteKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteKmsConfig = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteKmsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteKmsConfig = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteKmsConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteKmsConfig with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteKmsConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteKmsConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteKmsConfig with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteKmsConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteKmsConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteKmsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteKmsConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteKmsConfigProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteKmsConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteKmsConfigProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteKmsConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createReplication', () => { + it('invokes createReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateReplicationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReplication = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateReplicationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReplication = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createReplication( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateReplicationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReplication = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createReplication(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.CreateReplicationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReplication = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateReplicationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateReplicationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteReplication', () => { + it('invokes deleteReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReplication = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReplication = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteReplication( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReplication = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteReplication(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.DeleteReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReplication = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteReplicationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteReplicationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateReplication', () => { + it('invokes updateReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateReplicationRequest', + ['replication', 'name'] + ); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateReplication = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateReplicationRequest', + ['replication', 'name'] + ); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateReplication = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateReplication( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateReplicationRequest', + ['replication', 'name'] + ); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateReplication = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateReplication(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.UpdateReplicationRequest', + ['replication', 'name'] + ); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateReplication = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateReplicationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateReplicationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('stopReplication', () => { + it('invokes stopReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.StopReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.stopReplication = + stubLongRunningCall(expectedResponse); + const [operation] = await client.stopReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.StopReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.stopReplication = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.stopReplication( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.StopReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.stopReplication = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.stopReplication(request), expectedError); + const actualRequest = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.StopReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.stopReplication = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.stopReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.stopReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkStopReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkStopReplicationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkStopReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkStopReplicationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('resumeReplication', () => { + it('invokes resumeReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ResumeReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.resumeReplication = + stubLongRunningCall(expectedResponse); + const [operation] = await client.resumeReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ResumeReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.resumeReplication = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resumeReplication( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ResumeReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.resumeReplication = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.resumeReplication(request), expectedError); + const actualRequest = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ResumeReplicationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.resumeReplication = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.resumeReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumeReplication as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkResumeReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkResumeReplicationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkResumeReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkResumeReplicationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('reverseReplicationDirection', () => { + it('invokes reverseReplicationDirection without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reverseReplicationDirection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.reverseReplicationDirection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reverseReplicationDirection without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reverseReplicationDirection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.reverseReplicationDirection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reverseReplicationDirection with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.reverseReplicationDirection(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reverseReplicationDirection with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.reverseReplicationDirection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reverseReplicationDirection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkReverseReplicationDirectionProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkReverseReplicationDirectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkReverseReplicationDirectionProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkReverseReplicationDirectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listStoragePools', () => { + it('invokes listStoragePools without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListStoragePoolsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.innerApiCalls.listStoragePools = stubSimpleCall(expectedResponse); + const [response] = await client.listStoragePools(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listStoragePools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listStoragePools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoragePools without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListStoragePoolsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.innerApiCalls.listStoragePools = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listStoragePools( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IStoragePool[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listStoragePools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listStoragePools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoragePools with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListStoragePoolsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listStoragePools = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listStoragePools(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listStoragePools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listStoragePools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoragePoolsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListStoragePoolsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.descriptors.page.listStoragePools.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listStoragePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.StoragePool[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.StoragePool) => { + 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.listStoragePools.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listStoragePools, request) + ); + assert( + (client.descriptors.page.listStoragePools.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listStoragePoolsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListStoragePoolsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listStoragePools.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listStoragePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.StoragePool[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.StoragePool) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listStoragePools.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listStoragePools, request) + ); + assert( + (client.descriptors.page.listStoragePools.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listStoragePools without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListStoragePoolsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.descriptors.page.listStoragePools.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IStoragePool[] = []; + const iterable = client.listStoragePoolsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listStoragePools.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listStoragePools with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListStoragePoolsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listStoragePools.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listStoragePoolsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IStoragePool[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listStoragePools.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listVolumes', () => { + it('invokes listVolumes without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListVolumesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.innerApiCalls.listVolumes = stubSimpleCall(expectedResponse); + const [response] = await client.listVolumes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVolumes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVolumes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVolumes without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListVolumesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.innerApiCalls.listVolumes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVolumes( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IVolume[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVolumes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVolumes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVolumes with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListVolumesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVolumes = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listVolumes(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listVolumes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVolumes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVolumesStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListVolumesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.descriptors.page.listVolumes.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listVolumesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Volume[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Volume) => { + 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.listVolumes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVolumes, request) + ); + assert( + (client.descriptors.page.listVolumes.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVolumesStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListVolumesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVolumes.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listVolumesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Volume[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Volume) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listVolumes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVolumes, request) + ); + assert( + (client.descriptors.page.listVolumes.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVolumes without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListVolumesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.descriptors.page.listVolumes.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IVolume[] = []; + const iterable = client.listVolumesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVolumes with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListVolumesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVolumes.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listVolumesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IVolume[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listSnapshots', () => { + it('invokes listSnapshots without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListSnapshotsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.innerApiCalls.listSnapshots = stubSimpleCall(expectedResponse); + const [response] = await client.listSnapshots(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshots without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListSnapshotsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.innerApiCalls.listSnapshots = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSnapshots( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.ISnapshot[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshots with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListSnapshotsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSnapshots = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listSnapshots(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSnapshots as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshotsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListSnapshotsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.descriptors.page.listSnapshots.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listSnapshotsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Snapshot[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.Snapshot) => { + 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.listSnapshots.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSnapshots, request) + ); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSnapshotsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListSnapshotsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSnapshots.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listSnapshotsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Snapshot[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.Snapshot) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSnapshots, request) + ); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSnapshots without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListSnapshotsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.descriptors.page.listSnapshots.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.ISnapshot[] = []; + const iterable = client.listSnapshotsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listSnapshots.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSnapshots with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListSnapshotsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSnapshots.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSnapshotsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.ISnapshot[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listSnapshots.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listActiveDirectories', () => { + it('invokes listActiveDirectories without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListActiveDirectoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + ]; + client.innerApiCalls.listActiveDirectories = + stubSimpleCall(expectedResponse); + const [response] = await client.listActiveDirectories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listActiveDirectories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listActiveDirectories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listActiveDirectories without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListActiveDirectoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + ]; + client.innerApiCalls.listActiveDirectories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listActiveDirectories( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IActiveDirectory[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listActiveDirectories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listActiveDirectories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listActiveDirectories with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListActiveDirectoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listActiveDirectories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listActiveDirectories(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listActiveDirectories as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listActiveDirectories as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listActiveDirectoriesStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListActiveDirectoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + ]; + client.descriptors.page.listActiveDirectories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listActiveDirectoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.ActiveDirectory[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.ActiveDirectory) => { + 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.listActiveDirectories + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listActiveDirectories, request) + ); + assert( + ( + client.descriptors.page.listActiveDirectories + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listActiveDirectoriesStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListActiveDirectoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listActiveDirectories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listActiveDirectoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.ActiveDirectory[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.ActiveDirectory) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listActiveDirectories + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listActiveDirectories, request) + ); + assert( + ( + client.descriptors.page.listActiveDirectories + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listActiveDirectories without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListActiveDirectoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ), + ]; + client.descriptors.page.listActiveDirectories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IActiveDirectory[] = []; + const iterable = client.listActiveDirectoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listActiveDirectories + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listActiveDirectories + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listActiveDirectories with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListActiveDirectoriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listActiveDirectories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listActiveDirectoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IActiveDirectory[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listActiveDirectories + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listActiveDirectories + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listKmsConfigs', () => { + it('invokes listKmsConfigs without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListKmsConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.innerApiCalls.listKmsConfigs = stubSimpleCall(expectedResponse); + const [response] = await client.listKmsConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listKmsConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listKmsConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listKmsConfigs without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListKmsConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.innerApiCalls.listKmsConfigs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listKmsConfigs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IKmsConfig[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listKmsConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listKmsConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listKmsConfigs with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListKmsConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listKmsConfigs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listKmsConfigs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listKmsConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listKmsConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listKmsConfigsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListKmsConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.descriptors.page.listKmsConfigs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listKmsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.KmsConfig[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.KmsConfig) => { + 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.listKmsConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listKmsConfigs, request) + ); + assert( + (client.descriptors.page.listKmsConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listKmsConfigsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListKmsConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listKmsConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listKmsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.KmsConfig[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.KmsConfig) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listKmsConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listKmsConfigs, request) + ); + assert( + (client.descriptors.page.listKmsConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listKmsConfigs without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListKmsConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.descriptors.page.listKmsConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IKmsConfig[] = []; + const iterable = client.listKmsConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listKmsConfigs with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListKmsConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listKmsConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listKmsConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IKmsConfig[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReplications', () => { + it('invokes listReplications without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListReplicationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.innerApiCalls.listReplications = stubSimpleCall(expectedResponse); + const [response] = await client.listReplications(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReplications as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReplications as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReplications without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListReplicationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.innerApiCalls.listReplications = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReplications( + request, + ( + err?: Error | null, + result?: protos.google.cloud.netapp.v1.IReplication[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReplications as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReplications as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReplications with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListReplicationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReplications = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listReplications(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listReplications as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReplications as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReplicationsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListReplicationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.descriptors.page.listReplications.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listReplicationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Replication[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.Replication) => { + 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.listReplications.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReplications, request) + ); + assert( + (client.descriptors.page.listReplications.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReplicationsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListReplicationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReplications.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listReplicationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Replication[] = []; + stream.on( + 'data', + (response: protos.google.cloud.netapp.v1.Replication) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listReplications.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReplications, request) + ); + assert( + (client.descriptors.page.listReplications.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReplications without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListReplicationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.descriptors.page.listReplications.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IReplication[] = []; + const iterable = client.listReplicationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listReplications.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReplications.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReplications with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.netapp.v1.ListReplicationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReplications.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReplicationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IReplication[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listReplications.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReplications.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('activeDirectory', () => { + const fakePath = '/rendered/path/activeDirectory'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + active_directory: 'activeDirectoryValue', + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.activeDirectoryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.activeDirectoryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('activeDirectoryPath', () => { + const result = client.activeDirectoryPath( + 'projectValue', + 'locationValue', + 'activeDirectoryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.activeDirectoryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromActiveDirectoryName', () => { + const result = client.matchProjectFromActiveDirectoryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromActiveDirectoryName', () => { + const result = client.matchLocationFromActiveDirectoryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActiveDirectoryFromActiveDirectoryName', () => { + const result = + client.matchActiveDirectoryFromActiveDirectoryName(fakePath); + assert.strictEqual(result, 'activeDirectoryValue'); + assert( + (client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('kmsConfig', () => { + const fakePath = '/rendered/path/kmsConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + kms_config: 'kmsConfigValue', + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.kmsConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.kmsConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('kmsConfigPath', () => { + const result = client.kmsConfigPath( + 'projectValue', + 'locationValue', + 'kmsConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.kmsConfigPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromKmsConfigName', () => { + const result = client.matchProjectFromKmsConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromKmsConfigName', () => { + const result = client.matchLocationFromKmsConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKmsConfigFromKmsConfigName', () => { + const result = client.matchKmsConfigFromKmsConfigName(fakePath); + assert.strictEqual(result, 'kmsConfigValue'); + assert( + (client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('replication', () => { + const fakePath = '/rendered/path/replication'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + volume: 'volumeValue', + replication: 'replicationValue', + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.replicationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.replicationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('replicationPath', () => { + const result = client.replicationPath( + 'projectValue', + 'locationValue', + 'volumeValue', + 'replicationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.replicationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReplicationName', () => { + const result = client.matchProjectFromReplicationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReplicationName', () => { + const result = client.matchLocationFromReplicationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVolumeFromReplicationName', () => { + const result = client.matchVolumeFromReplicationName(fakePath); + assert.strictEqual(result, 'volumeValue'); + assert( + (client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReplicationFromReplicationName', () => { + const result = client.matchReplicationFromReplicationName(fakePath); + assert.strictEqual(result, 'replicationValue'); + assert( + (client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('snapshot', () => { + const fakePath = '/rendered/path/snapshot'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + volume: 'volumeValue', + snapshot: 'snapshotValue', + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.snapshotPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.snapshotPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('snapshotPath', () => { + const result = client.snapshotPath( + 'projectValue', + 'locationValue', + 'volumeValue', + 'snapshotValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.snapshotPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSnapshotName', () => { + const result = client.matchProjectFromSnapshotName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSnapshotName', () => { + const result = client.matchLocationFromSnapshotName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVolumeFromSnapshotName', () => { + const result = client.matchVolumeFromSnapshotName(fakePath); + assert.strictEqual(result, 'volumeValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSnapshotFromSnapshotName', () => { + const result = client.matchSnapshotFromSnapshotName(fakePath); + assert.strictEqual(result, 'snapshotValue'); + assert( + (client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('storagePool', () => { + const fakePath = '/rendered/path/storagePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + storage_pool: 'storagePoolValue', + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.storagePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.storagePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('storagePoolPath', () => { + const result = client.storagePoolPath( + 'projectValue', + 'locationValue', + 'storagePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.storagePoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromStoragePoolName', () => { + const result = client.matchProjectFromStoragePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.storagePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromStoragePoolName', () => { + const result = client.matchLocationFromStoragePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.storagePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchStoragePoolFromStoragePoolName', () => { + const result = client.matchStoragePoolFromStoragePoolName(fakePath); + assert.strictEqual(result, 'storagePoolValue'); + assert( + (client.pathTemplates.storagePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('volume', () => { + const fakePath = '/rendered/path/volume'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + volume: 'volumeValue', + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.volumePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.volumePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('volumePath', () => { + const result = client.volumePath( + 'projectValue', + 'locationValue', + 'volumeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.volumePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVolumeName', () => { + const result = client.matchProjectFromVolumeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.volumePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVolumeName', () => { + const result = client.matchLocationFromVolumeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.volumePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVolumeFromVolumeName', () => { + const result = client.matchVolumeFromVolumeName(fakePath); + assert.strictEqual(result, 'volumeValue'); + assert( + (client.pathTemplates.volumePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-netapp/tsconfig.json b/packages/google-cloud-netapp/tsconfig.json new file mode 100644 index 000000000000..c78f1c884ef6 --- /dev/null +++ b/packages/google-cloud-netapp/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-netapp/webpack.config.js b/packages/google-cloud-netapp/webpack.config.js new file mode 100644 index 000000000000..04e22d10ddb5 --- /dev/null +++ b/packages/google-cloud-netapp/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'NetApp', + filename: './net-app.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/release-please-config.json b/release-please-config.json index e26cba42a1f3..aa3cb29a2059 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -145,7 +145,8 @@ "packages/google-cloud-migrationcenter": {}, "packages/google-cloud-sql": {}, "packages/google-cloud-commerce-consumer-procurement": {}, - "packages/google-cloud-policytroubleshooter-iam": {} + "packages/google-cloud-policytroubleshooter-iam": {}, + "packages/google-cloud-netapp": {} }, "plugins": [ {