diff --git a/packages/google-cloud-dataplex/.eslintignore b/packages/google-cloud-dataplex/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-dataplex/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-dataplex/.eslintrc.json b/packages/google-cloud-dataplex/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-dataplex/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-dataplex/.gitattributes b/packages/google-cloud-dataplex/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-dataplex/.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-dataplex/.github/.OwlBot.yaml b/packages/google-cloud-dataplex/.github/.OwlBot.yaml new file mode 100644 index 00000000000..62fb1fb24eb --- /dev/null +++ b/packages/google-cloud-dataplex/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/dataplex/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-dataplex/.gitignore b/packages/google-cloud-dataplex/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-dataplex/.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-dataplex/.jsdoc.js b/packages/google-cloud-dataplex/.jsdoc.js new file mode 100644 index 00000000000..ee5e526879d --- /dev/null +++ b/packages/google-cloud-dataplex/.jsdoc.js @@ -0,0 +1,55 @@ +// 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. +// +// ** 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 2022 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/dataplex', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-dataplex/.mocharc.js b/packages/google-cloud-dataplex/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-dataplex/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-dataplex/.nycrc b/packages/google-cloud-dataplex/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-dataplex/.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-dataplex/.prettierignore b/packages/google-cloud-dataplex/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-dataplex/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-dataplex/.prettierrc.js b/packages/google-cloud-dataplex/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-dataplex/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-dataplex/.repo-metadata.json b/packages/google-cloud-dataplex/.repo-metadata.json new file mode 100644 index 00000000000..d9314a6a5d7 --- /dev/null +++ b/packages/google-cloud-dataplex/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "dataplex", + "name_pretty": "Cloud Dataplex", + "product_documentation": "https://cloud.google.com/dataplex/", + "client_documentation": "https://cloud.google.com/dataplex", + "issue_tracker": "https://github.com/googleapis/nodejs-dataplex/issues", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-dataplex", + "distribution_name": "@google-cloud/dataplex", + "api_id": "dataplex.googleapis.com", + "default_version": "v1", + "requires_billing": true +} + diff --git a/packages/google-cloud-dataplex/CODE_OF_CONDUCT.md b/packages/google-cloud-dataplex/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-dataplex/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-dataplex/CONTRIBUTING.md b/packages/google-cloud-dataplex/CONTRIBUTING.md new file mode 100644 index 00000000000..7786ca4f303 --- /dev/null +++ b/packages/google-cloud-dataplex/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 Cloud Dataplex 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=dataplex.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-dataplex/LICENSE b/packages/google-cloud-dataplex/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-dataplex/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-dataplex/README.md b/packages/google-cloud-dataplex/README.md new file mode 100644 index 00000000000..b3a5710965b --- /dev/null +++ b/packages/google-cloud-dataplex/README.md @@ -0,0 +1,126 @@ +[//]: # "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 + +# [Cloud Dataplex: Node.js Client](https://github.com/googleapis/nodejs-dataplex) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/dataplex.svg)](https://www.npmjs.org/package/@google-cloud/dataplex) + + + + +dataplex client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-dataplex/blob/master/CHANGELOG.md). + +* [Cloud Dataplex Node.js Client API Reference][client-docs] +* [Cloud Dataplex Documentation][product-docs] +* [github.com/googleapis/nodejs-dataplex](https://github.com/googleapis/nodejs-dataplex) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Dataplex 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/dataplex +``` + + + + + +The [Cloud Dataplex Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dataplex/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-dataplex/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/dataplex +[product-docs]: https://cloud.google.com/dataplex/ +[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=dataplex.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-dataplex/linkinator.config.json b/packages/google-cloud-dataplex/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-dataplex/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json new file mode 100644 index 00000000000..8419c4bb6a9 --- /dev/null +++ b/packages/google-cloud-dataplex/package.json @@ -0,0 +1,64 @@ +{ + "name": "@google-cloud/dataplex", + "version": "0.1.0", + "description": "dataplex client for Node.js", + "repository": "googleapis/googleapis/nodejs-dataplex", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google dataplex", + "dataplex", + "dataplex service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^2.12.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v10.0.0" + } +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto new file mode 100644 index 00000000000..7539b35300b --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto @@ -0,0 +1,281 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "LogsProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// The payload associated with Discovery data processing. +message DiscoveryEvent { + // The type of the event. + enum EventType { + // An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // An event representing discovery configuration in effect. + CONFIG = 1; + + // An event representing a metadata entity being created. + ENTITY_CREATED = 2; + + // An event representing a metadata entity being updated. + ENTITY_UPDATED = 3; + + // An event representing a metadata entity being deleted. + ENTITY_DELETED = 4; + + // An event representing a partition being created. + PARTITION_CREATED = 5; + + // An event representing a partition being updated. + PARTITION_UPDATED = 6; + + // An event representing a partition being deleted. + PARTITION_DELETED = 7; + } + + // The type of the entity. + enum EntityType { + // An unspecified event type. + ENTITY_TYPE_UNSPECIFIED = 0; + + // Entities representing structured data. + TABLE = 1; + + // Entities representing unstructured data. + FILESET = 2; + } + + // Details about configuration events. + message ConfigDetails { + // A list of discovery configuration parameters in effect. + // The keys are the field paths within DiscoverySpec. + // Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + // etc. + map parameters = 1; + } + + // Details about the entity. + message EntityDetails { + // The name of the entity resource. + // The name is the fully-qualified resource name. + string entity = 1; + + // The type of the entity resource. + EntityType type = 2; + } + + // Details about the partition. + message PartitionDetails { + // The name to the partition resource. + // The name is the fully-qualified resource name. + string partition = 1; + + // The name to the containing entity resource. + // The name is the fully-qualified resource name. + string entity = 2; + + // The type of the containing entity resource. + EntityType type = 3; + } + + // Details about the action. + message ActionDetails { + // The type of action. + // Eg. IncompatibleDataSchema, InvalidDataFormat + string type = 1; + } + + // The log message. + string message = 1; + + // The id of the associated lake. + string lake_id = 2; + + // The id of the associated zone. + string zone_id = 3; + + // The id of the associated asset. + string asset_id = 4; + + // The data location associated with the event. + string data_location = 5; + + // The type of the event being logged. + EventType type = 10; + + // Additional details about the event. + oneof details { + // Details about discovery configuration in effect. + ConfigDetails config = 20; + + // Details about the entity associated with the event. + EntityDetails entity = 21; + + // Details about the partition associated with the event. + PartitionDetails partition = 22; + + // Details about the action associated with the event. + ActionDetails action = 23; + } +} + +// The payload associated with Job logs that contains events describing jobs +// that have run within a Lake. +message JobEvent { + // The type of the job. + enum Type { + // Unspecified job type. + TYPE_UNSPECIFIED = 0; + + // Spark jobs. + SPARK = 1; + + // Notebook jobs. + NOTEBOOK = 2; + } + + // The completion status of the job. + enum State { + // Unspecified job state. + STATE_UNSPECIFIED = 0; + + // Job successfully completed. + SUCCEEDED = 1; + + // Job was unsuccessful. + FAILED = 2; + + // Job was cancelled by the user. + CANCELLED = 3; + + // Job was cancelled or aborted via the service executing the job. + ABORTED = 4; + } + + // The service used to execute the job. + enum Service { + // Unspecified service. + SERVICE_UNSPECIFIED = 0; + + // Cloud Dataproc. + DATAPROC = 1; + } + + // The log message. + string message = 1; + + // The unique id identifying the job. + string job_id = 2; + + // The time when the job started running. + google.protobuf.Timestamp start_time = 3; + + // The time when the job ended running. + google.protobuf.Timestamp end_time = 4; + + // The job state on completion. + State state = 5; + + // The number of retries. + int32 retries = 6; + + // The type of the job. + Type type = 7; + + // The service used to execute the job. + Service service = 8; + + // The reference to the job within the service. + string service_job = 9; +} + +// These messages contain information about sessions within an environment. +// The monitored resource is 'Environment'. +message SessionEvent { + // The type of the event. + enum EventType { + // An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // Event for start of a session. + START = 1; + + // Event for stop of a session. + STOP = 2; + + // Query events in the session. + QUERY = 3; + } + + // Execution details of the query. + message QueryDetail { + // Query Execution engine. + enum Engine { + // An unspecified Engine type. + ENGINE_UNSPECIFIED = 0; + + // Spark-sql engine is specified in Query. + SPARK_SQL = 1; + + // BigQuery engine is specified in Query. + BIGQUERY = 2; + } + + // The unique Query id identifying the query. + string query_id = 1; + + // The query text executed. + string query_text = 2; + + // Query Execution engine. + Engine engine = 3; + + // Time taken for execution of the query. + google.protobuf.Duration duration = 4; + + // The size of results the query produced. + int64 result_size_bytes = 5; + + // The data processed by the query. + int64 data_processed_bytes = 6; + } + + // The log message. + string message = 1; + + // The information about the user that created the session. + string user_id = 2; + + // Unique identifier for the session. + string session_id = 3; + + // The type of the event. + EventType type = 4; + + // Additional information about the Query metadata. + oneof detail { + // The execution details of the query. + QueryDetail query = 5; + } +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto new file mode 100644 index 00000000000..5320013ecf3 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto @@ -0,0 +1,580 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "MetadataProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Metadata service manages metadata resources such as tables, filesets and +// partitions. +service MetadataService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Get a metadata entity. + rpc GetEntity(GetEntityRequest) returns (Entity) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List metadata entities in a zone. + rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a metadata partition of an entity. + rpc GetPartition(GetPartitionRequest) returns (Partition) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + }; + option (google.api.method_signature) = "name"; + } + + // List metadata partitions of an entity. + rpc ListPartitions(ListPartitionsRequest) returns (ListPartitionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List metadata entities request. +message ListEntitiesRequest { + // Entity views. + enum EntityView { + // The default unset value. The API will default to the FULL view. + ENTITY_VIEW_UNSPECIFIED = 0; + + // Only list table entities. + TABLES = 1; + + // Only list fileset entities. + FILESETS = 2; + } + + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Required. Specify the entity view to make a partial list request. + EntityView view = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Maximum number of entities to return. The service may return fewer than + // this value. If unspecified, at most 10 entities will be returned. The + // maximum value is 1000; values above 1000 are set to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEntities` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListEntities` must match the call that provided the + // page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request by name prefix. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata entities response. +message ListEntitiesResponse { + // Entities in the specified parent zone. + repeated Entity entities = 1; + + // Token to retrieve the next page of results, or empty if there are no + // remaining results in the list. + string next_page_token = 2; +} + +// Get metadata entity request. +message GetEntityRequest { + // Entity views for get entity partial result. + enum EntityView { + // The API will default to the `BASIC` view. + ENTITY_VIEW_UNSPECIFIED = 0; + + // Minimal view that does not include the schema. + BASIC = 1; + + // Include basic information and schema. + SCHEMA = 2; + + // Include everything. + FULL = 4; + } + + // Required. The resource name of the entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Optional. Used to select the subset of entity information to return. + // Defaults to `BASIC`. + EntityView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata partitions request. +message ListPartitionsRequest { + // Required. The resource name of the parent entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Optional. Maximum number of partitions to return. The service may return fewer than + // this value. If unspecified, at most 10 partitions will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListPartitions` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListPartitions` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata partitions response. +message ListPartitionsResponse { + // Partitions under the specified parent entity. + repeated Partition partitions = 1; + + // Token to retrieve the next page of results, or empty if there are no + // remaining results in the list. + string next_page_token = 2; +} + +// Get metadata partition request. +message GetPartitionRequest { + // Required. The resource name of the partition: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; +} + +// Represents tables and fileset metadata contained within a zone. +message Entity { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Entity" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + }; + + // The type of entity. + enum Type { + // Type unspecified. + TYPE_UNSPECIFIED = 0; + + // Structured and semi-structured data. + TABLE = 1; + + // Unstructured data. + FILESET = 2; + } + + // Provides compatibility information for various metadata stores. + message CompatibilityStatus { + // Provides compatibility information for a specific metadata store. + message Compatibility { + // Output only. Whether the entity is compatible and can be represented in the metadata + // store. + bool compatible = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Provides additional detail if the entity is incompatible with the + // metadata store. + string reason = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Whether this entity is compatible with Hive Metastore. + Compatibility hive_metastore = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether this entity is compatible with BigQuery. + Compatibility bigquery = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the entity, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly longer description text. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the entity was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the entity was last updated. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A user-provided entity ID. It is mutable, and will be used as the + // published table name. Specifying a new ID in an update entity + // request will override the existing value. + string id = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The etag for this entity. + // Required for update requests. It must match the server's etag. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type of entity. + Type type = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the asset associated with the storage location containing the + // entity data. + string asset = 11 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The storage path of the entity data. + // For Cloud Storage data, this is the fully-qualified path to the entity, + // such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + // the table resource, such as + // `projects/project_id/datasets/dataset_id/tables/table_id`. + string data_path = 12 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The set of items within the data path constituting the data in the entity, + // represented as a glob path. + // Example: `gs://bucket/path/to/data/**/*.csv`. + string data_path_pattern = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the associated Data Catalog entry. + string catalog_entry = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Identifies the storage system of the entity data. + StorageSystem system = 15 [(google.api.field_behavior) = REQUIRED]; + + // Required. Identifies the storage format of the entity data. + // It does not apply to entities with data stored in BigQuery. + StorageFormat format = 16 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Metadata stores that the entity is compatible with. + CompatibilityStatus compatibility = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The description of the data structure and layout. + // The schema is not included in list responses. It is only included in + // `SCHEMA` and `FULL` entity views of a `GetEntity` response. + Schema schema = 50 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents partition metadata contained within entity instances. +message Partition { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Partition" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }; + + // Output only. The resource name of the partition, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + // {partition_id} is a generated unique ID. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; + + // Required. Immutable. The set of values representing the partition, which correspond to the + // partition schema defined in the parent entity. + repeated string values = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The location of the entity data within the partition, for example, + // `gs://bucket/path/to/entity/key1=value1/key2=value2`. + string location = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The etag for this partition. + // Required for update requests. It must match the server's etag. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Schema information describing the structure and layout of the data. +message Schema { + // Type information for fields in schemas and partition schemas. + enum Type { + // SchemaType unspecified. + TYPE_UNSPECIFIED = 0; + + // Boolean field. + BOOLEAN = 1; + + // Single byte numeric field. + BYTE = 2; + + // 16-bit numeric field. + INT16 = 3; + + // 32-bit numeric field. + INT32 = 4; + + // 64-bit numeric field. + INT64 = 5; + + // Floating point numeric field. + FLOAT = 6; + + // Double precision numeric field. + DOUBLE = 7; + + // Real value numeric field. + DECIMAL = 8; + + // Sequence of characters field. + STRING = 9; + + // Sequence of bytes field. + BINARY = 10; + + // Date and time field. + TIMESTAMP = 11; + + // Date field. + DATE = 12; + + // Time field. + TIME = 13; + + // Structured field. Nested fields that define the structure of the map. + // If all nested fields are nullable, this field represents a union. + RECORD = 14; + + // Null field that does not have values. + NULL = 100; + } + + // Additional qualifiers to define field semantics. + enum Mode { + // Mode unspecified. + MODE_UNSPECIFIED = 0; + + // The field has required semantics. + REQUIRED = 1; + + // The field has optional semantics, and may be null. + NULLABLE = 2; + + // The field has repeated (0 or more) semantics, and is a list of values. + REPEATED = 3; + } + + // Represents a column field within a table schema. + message SchemaField { + // Required. The name of the field. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. User friendly field description. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type of field. + Type type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Additional field semantics. + Mode mode = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Any nested field for complex types. + repeated SchemaField fields = 10 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a key field within the entity's partition structure. + message PartitionField { + // Required. The name of the field. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of field. + Type type = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The structure of paths within the entity, which represent partitions. + enum PartitionStyle { + // PartitionStyle unspecified + PARTITION_STYLE_UNSPECIFIED = 0; + + // Partitions are hive-compatible. + // Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, + // `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. + HIVE_COMPATIBLE = 1; + } + + // Required. Whether the schema is user-managed or managed by the service. User-managed + // schemas are not automatically updated by discovery jobs. + bool user_managed = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The sequence of fields describing data in table entities. + repeated SchemaField fields = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sequence of fields describing the partition structure in entities. + // If this field is empty, there are no partitions within the data. + repeated PartitionField partition_fields = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The structure of paths containing partition data within the entity. + PartitionStyle partition_style = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Describes the format of the data within its storage location. +message StorageFormat { + // Describes CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to interpret as header rows that should be skipped + // when reading data rows. + int32 header_rows = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter used to separate values. Defaults to ','. + string delimiter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character used to quote column values. Defaults to empty, + // implying unquoted data. + string quote = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describes JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The specific file format of the data. + enum Format { + // Format unspecified. + FORMAT_UNSPECIFIED = 0; + + // Parquet-formatted structured data. + PARQUET = 1; + + // Avro-formatted structured data. + AVRO = 2; + + // Orc-formatted structured data. + ORC = 3; + + // Csv-formatted semi-structured data. + CSV = 100; + + // Json-formatted semi-structured data. + JSON = 101; + + // Image data formats (such as jpg and png). + IMAGE = 200; + + // Audio data formats (such as mp3 and wav). + AUDIO = 201; + + // Video data formats (such as mp4 and mpg). + VIDEO = 202; + + // Textual data formats (such as txt and xml). + TEXT = 203; + + // TensorFlow record format. + TFRECORD = 204; + + // Data that doesn't match a specific format. + OTHER = 1000; + + // Data of an unknown format. + UNKNOWN = 1001; + } + + // The specific compressed file format of the data. + enum CompressionFormat { + // CompressionFormat unspecified. Implies uncompressed data. + COMPRESSION_FORMAT_UNSPECIFIED = 0; + + // GZip compressed set of files. + GZIP = 2; + + // BZip2 compressed set of files. + BZIP2 = 3; + } + + // Output only. The data format associated with the stored data, which represents + // content type values. + Format format = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The compression type associated with the stored data. + // If unspecified, the data is uncompressed. + CompressionFormat compression_format = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The mime type descriptor for the data. This field is valid for formats + // other than `UNKNOWN` and `MIXED`. + string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Additional format-specific options. + oneof options { + // Optional. Additional information about CSV formatted data. + CsvOptions csv = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information about CSV formatted data. + JsonOptions json = 11 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Identifies the cloud system that manages the data storage. +enum StorageSystem { + // Storage system unspecified. + STORAGE_SYSTEM_UNSPECIFIED = 0; + + // The entity data is contained within a Cloud Storage bucket. + CLOUD_STORAGE = 1; + + // The entity data is contained within a BigQuery dataset. + BIGQUERY = 2; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto new file mode 100644 index 00000000000..5c71a9bb531 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto @@ -0,0 +1,798 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// A lake is a centralized repository for managing enterprise data across the +// organization distributed across many cloud projects, and stored in a variety +// of storage services such as Google Cloud Storage and BigQuery. The resources +// attached to a lake are referred to as managed resources. Data within these +// managed resources can be structured or unstructured. A lake provides data +// admins with tools to organize, secure and manage their data at scale, and +// provides data scientists and data engineers an integrated experience to +// easily search, discover, analyze and transform data and associated metadata. +message Lake { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" + }; + + // Settings to manage association of Dataproc Metastore with a lake. + message Metastore { + // Optional. A relative reference to the Dataproc Metastore + // (https://cloud.google.com/dataproc-metastore/docs) service associated + // with the lake: + // `projects/{project_id}/locations/{location_id}/services/{service_id}` + string service = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Status of Lake and Dataproc Metastore service instance association. + message MetastoreStatus { + // Current state of association. + enum State { + // Unspecified. + STATE_UNSPECIFIED = 0; + + // A Metastore service instance is not associated with the lake. + NONE = 1; + + // A Metastore service instance is attached to the lake. + READY = 2; + + // Attach/detach is in progress. + UPDATING = 3; + + // Attach/detach could not be done due to errors. + ERROR = 4; + } + + // Current state of association. + State state = 1; + + // Additional information about the current status. + string message = 2; + + // Last update time of the metastore status of the lake. + google.protobuf.Timestamp update_time = 3; + + // The URI of the endpoint used to access the Metastore service. + string endpoint = 4; + } + + // Output only. The relative resource name of the lake, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the lake. This ID will be + // different if the lake is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the lake was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the lake was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for the lake. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the lake. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the lake. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service account associated with this lake. This service account must be + // authorized to access or operate on resources managed by the lake. + string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Settings to manage lake and Dataproc Metastore service instance + // association. + Metastore metastore = 102 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Aggregated status of the underlying assets of the lake. + AssetStatus asset_status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metastore status of the lake. + MetastoreStatus metastore_status = 104 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Aggregated status of the underlying assets of a lake or zone. +message AssetStatus { + // Last update time of the status. + google.protobuf.Timestamp update_time = 1; + + // Number of active assets. + int32 active_assets = 2; + + // Number of assets that are in process of updating the security policy on + // attached resources. + int32 security_policy_applying_assets = 3; +} + +// A zone represents a logical group of related assets within a lake. A zone can +// be used to map to organizational structure or represent stages of data +// readiness from raw to curated. It provides managing behavior that is shared +// or inherited by all contained assets. +message Zone { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Zone" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" + }; + + // Type of zone. + enum Type { + // Zone type not specified. + TYPE_UNSPECIFIED = 0; + + // A zone that contains data that needs further processing before it is + // considered generally ready for consumption and analytics workloads. + RAW = 1; + + // A zone that contains data that is considered to be ready for broader + // consumption and analytics workloads. Curated structured data stored in + // Cloud Storage must conform to certain file formats (parquet, avro and + // orc) and organized in a hive-compatible directory layout. + CURATED = 2; + } + + // Settings for resources attached as assets within a zone. + message ResourceSpec { + // Location type of the resources attached to a zone. + enum LocationType { + // Unspecified location type. + LOCATION_TYPE_UNSPECIFIED = 0; + + // Resources that are associated with a single region. + SINGLE_REGION = 1; + + // Resources that are associated with a multi-region location. + MULTI_REGION = 2; + } + + // Required. Immutable. The location type of the resources that are allowed to be attached to the + // assets within this zone. + LocationType location_type = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Settings to manage the metadata discovery and publishing in a zone. + message DiscoverySpec { + // Describe CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The number of rows to interpret as header rows that should be skipped + // when reading data rows. + int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter being used to separate values. This defaults to ','. + string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for CSV data. + // If true, all columns will be registered as strings. + bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describe JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for Json data. + // If true, all columns will be registered as their primitive types + // (strings, number or boolean). + bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Whether discovery is enabled. + bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of patterns to apply for selecting data to include during + // discovery if only a subset of the data should considered. For Cloud + // Storage bucket assets, these are interpreted as glob patterns used to + // match object names. For BigQuery dataset assets, these are + // interpreted as patterns to match table names. + repeated string include_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to exclude during + // discovery. For Cloud Storage bucket assets, these are interpreted as + // glob patterns used to match object names. For BigQuery dataset assets, + // these are interpreted as patterns to match table names. + repeated string exclude_patterns = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for CSV data. + CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Json data. + JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Determines when discovery is triggered. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // discovery periodically. Successive discovery runs must be scheduled at + // least 60 minutes apart. + // The default value is to run discovery every 60 minutes. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Output only. The relative resource name of the zone, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the zone. This ID will be + // different if the zone is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the zone was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the zone was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the zone. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the zone. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the zone. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The type of the zone. + Type type = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Specification of the discovery feature applied to data in this zone. + DiscoverySpec discovery_spec = 103 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Specification of the resources that are referenced by the assets within + // this zone. + ResourceSpec resource_spec = 104 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Aggregated status of the underlying assets of the zone. + AssetStatus asset_status = 105 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Action represents an issue requiring administrator action for resolution. +message Action { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Action" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/actions/{action}" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" + }; + + // The category of issues. + enum Category { + // Unspecified category. + CATEGORY_UNSPECIFIED = 0; + + // Resource management related issues. + RESOURCE_MANAGEMENT = 1; + + // Security policy related issues. + SECURITY_POLICY = 2; + + // Data and discovery related issues. + DATA_DISCOVERY = 3; + } + + // Action details for resource references in assets that cannot be located. + message MissingResource { + + } + + // Action details for unauthorized resource issues raised to indicate that the + // service account associated with the lake instance is not authorized to + // access or manage the resource associated with an asset. + message UnauthorizedResource { + + } + + // Failed to apply security policy to the managed resource(s) under a + // lake, zone or an asset. For a lake or zone resource, one or more underlying + // assets has a failure applying security policy to the associated managed + // resource. + message FailedSecurityPolicyApply { + // Resource name of one of the assets with failing security policy + // application. Populated for a lake or zone resource only. + string asset = 1; + } + + // Action details for invalid or unsupported data files detected by discovery. + message InvalidDataFormat { + // The list of data locations sampled and used for format/schema + // inference. + repeated string sampled_data_locations = 1; + + // The expected data format of the entity. + string expected_format = 2; + + // The new unexpected data format within the entity. + string new_format = 3; + } + + // Action details for incompatible schemas detected by discovery. + message IncompatibleDataSchema { + // Whether the action relates to a schema that is incompatible or modified. + enum SchemaChange { + // Schema change unspecified. + SCHEMA_CHANGE_UNSPECIFIED = 0; + + // Newly discovered schema is incompatible with existing schema. + INCOMPATIBLE = 1; + + // Newly discovered schema has changed from existing schema for data in a + // curated zone. + MODIFIED = 2; + } + + // The name of the table containing invalid data. + string table = 1; + + // The existing and expected schema of the table. The schema is provided as + // a JSON formatted structure listing columns and data types. + string existing_schema = 2; + + // The new and incompatible schema within the table. The schema is provided + // as a JSON formatted structured listing columns and data types. + string new_schema = 3; + + // The list of data locations sampled and used for format/schema + // inference. + repeated string sampled_data_locations = 4; + + // Whether the action relates to a schema that is incompatible or modified. + SchemaChange schema_change = 5; + } + + // Action details for invalid or unsupported partitions detected by discovery. + message InvalidDataPartition { + // The expected partition structure. + enum PartitionStructure { + // PartitionStructure unspecified. + PARTITION_STRUCTURE_UNSPECIFIED = 0; + + // Consistent hive-style partition definition (both raw and curated zone). + CONSISTENT_KEYS = 1; + + // Hive style partition definition (curated zone only). + HIVE_STYLE_KEYS = 2; + } + + // The issue type of InvalidDataPartition. + PartitionStructure expected_structure = 1; + } + + // Action details for absence of data detected by discovery. + message MissingData { + + } + + // Action details for invalid data arrangement. + message InvalidDataOrganization { + + } + + // The category of issue associated with the action. + Category category = 1; + + // Detailed description of the issue requiring action. + string issue = 2; + + // The time that the issue was detected. + google.protobuf.Timestamp detect_time = 4; + + // Output only. The relative resource name of the action, of the form: + // `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + string name = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Action" + } + ]; + + // Output only. The relative resource name of the lake, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string lake = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Output only. The relative resource name of the zone, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string zone = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Output only. The relative resource name of the asset, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string asset = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; + + // The list of data locations associated with this action. Cloud Storage + // locations are represented as URI paths(E.g. + // `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + // resource names(E.g. + // `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + repeated string data_locations = 9; + + // Additional details about the action based on the action category. + oneof details { + // Details for issues related to invalid or unsupported data formats. + InvalidDataFormat invalid_data_format = 10; + + // Details for issues related to incompatible schemas detected within data. + IncompatibleDataSchema incompatible_data_schema = 11; + + // Details for issues related to invalid or unsupported data partition + // structure. + InvalidDataPartition invalid_data_partition = 12; + + // Details for issues related to absence of data within managed resources. + MissingData missing_data = 13; + + // Details for issues related to absence of a managed resource. + MissingResource missing_resource = 14; + + // Details for issues related to lack of permissions to access data + // resources. + UnauthorizedResource unauthorized_resource = 15; + + // Details for issues related to applying security policy. + FailedSecurityPolicyApply failed_security_policy_apply = 21; + + // Details for issues related to invalid data arrangement. + InvalidDataOrganization invalid_data_organization = 22; + } +} + +// An asset represents a cloud resource that is being managed within a lake as a +// member of a zone. +message Asset { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Asset" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" + }; + + // Security policy status of the asset. Data security policy, i.e., readers, + // writers & owners, should be specified in the lake/zone/asset IAM policy. + message SecurityStatus { + // The state of the security policy. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Security policy has been successfully applied to the attached resource. + READY = 1; + + // Security policy is in the process of being applied to the attached + // resource. + APPLYING = 2; + + // Security policy could not be applied to the attached resource due to + // errors. + ERROR = 3; + } + + // The current state of the security policy applied to the attached + // resource. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + } + + // Settings to manage the metadata discovery and publishing for an asset. + message DiscoverySpec { + // Describe CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The number of rows to interpret as header rows that should be skipped + // when reading data rows. + int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter being used to separate values. This defaults to ','. + string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for CSV data. + // If true, all columns will be registered as strings. + bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describe JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for Json data. + // If true, all columns will be registered as their primitive types + // (strings, number or boolean). + bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Whether discovery is enabled. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to include during + // discovery if only a subset of the data should considered. For Cloud + // Storage bucket assets, these are interpreted as glob patterns used to + // match object names. For BigQuery dataset assets, these are interpreted as + // patterns to match table names. + repeated string include_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to exclude during + // discovery. For Cloud Storage bucket assets, these are interpreted as + // glob patterns used to match object names. For BigQuery dataset assets, + // these are interpreted as patterns to match table names. + repeated string exclude_patterns = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for CSV data. + CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Json data. + JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Determines when discovery is triggered. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // discovery periodically. Successive discovery runs must be scheduled at + // least 60 minutes apart. + // The default value is to run discovery every 60 minutes. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Identifies the cloud resource that is referenced by this asset. + message ResourceSpec { + // Type of resource. + enum Type { + // Type not specified. + TYPE_UNSPECIFIED = 0; + + // Cloud Storage bucket. + STORAGE_BUCKET = 1; + + // BigQuery dataset. + BIGQUERY_DATASET = 2; + } + + // Immutable. Relative name of the cloud resource that contains the data that is + // being managed within a lake. For example: + // `projects/{project_number}/buckets/{bucket_id}` + // `projects/{project_number}/datasets/{dataset_id}` + // If the creation policy indicates ATTACH behavior, then an existing + // resource must be provided. + // If the policy indicates CREATE behavior, new resource will be created + // with the given name.However if it is empty, then the resource will be + // created using {asset_id}-{UUID} template for name. + // The location of the referenced resource must always match that of the + // asset. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. Type of resource. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Status of the resource referenced by an asset. + message ResourceStatus { + // The state of a resource. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Resource does not have any errors. + READY = 1; + + // Resource has errors. + ERROR = 2; + } + + // The current state of the managed resource. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + } + + // Status of discovery for an asset. + message DiscoveryStatus { + // Current state of discovery. + enum State { + // State is unspecified. + STATE_UNSPECIFIED = 0; + + // Discovery for the asset is scheduled. + SCHEDULED = 1; + + // Discovery for the asset is running. + IN_PROGRESS = 2; + + // Discovery for the asset is currently paused (e.g. due to a lack + // of available resources). It will be automatically resumed. + PAUSED = 3; + + // Discovery for the asset is disabled. + DISABLED = 5; + } + + // The aggregated data statistics for the asset reported by discovery. + message Stats { + // The count of data items within the referenced resource. + int64 data_items = 1; + + // The number of stored data bytes within the referenced resource. + int64 data_size = 2; + + // The count of table entities within the referenced resource. + int64 tables = 3; + + // The count of fileset entities within the referenced resource. + int64 filesets = 4; + } + + // The current status of the discovery feature. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + + // The start time of the last discovery run. + google.protobuf.Timestamp last_run_time = 4; + + // Data Stats of the asset reported by discovery. + Stats stats = 6; + + // The duration of the last discovery run. + google.protobuf.Duration last_run_duration = 7; + } + + // Output only. The relative resource name of the asset, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the asset. This ID will be + // different if the asset is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the asset was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the asset was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the asset. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the asset. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the asset. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Specification of the resource that is referenced by this asset. + ResourceSpec resource_spec = 100 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Status of the resource referenced by this asset. + ResourceStatus resource_status = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of the security policy applied to resource referenced by this asset. + SecurityStatus security_status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Specification of the discovery feature applied to data referenced by this + // asset. + // When this spec is left unset, the asset will use the spec set on the parent + // zone. + DiscoverySpec discovery_spec = 106 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of the discovery feature applied to data referenced by this asset. + DiscoveryStatus discovery_status = 107 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// State of a resource. +enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // Resource is active, i.e., ready to use. + ACTIVE = 1; + + // Resource is under creation. + CREATING = 2; + + // Resource is under deletion. + DELETING = 3; + + // Resource is active but has unresolved actions. + ACTION_REQUIRED = 4; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto new file mode 100644 index 00000000000..401cb9a8332 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto @@ -0,0 +1,897 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.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/dataplex/v1/resources.proto"; +import "google/cloud/dataplex/v1/tasks.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Dataplex service provides data lakes as a service. The primary resources +// offered by this service are Lakes, Zones and Assets which collectively allow +// a data adminstrator to organize, manage, secure and catalog data across their +// organization located across cloud projects in a variety of storage systems +// including Cloud Storage and BigQuery. +service DataplexService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a lake resource. + rpc CreateLake(CreateLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/lakes" + body: "lake" + }; + option (google.api.method_signature) = "parent,lake,lake_id"; + option (google.longrunning.operation_info) = { + response_type: "Lake" + metadata_type: "OperationMetadata" + }; + } + + // Updates a lake resource. + rpc UpdateLake(UpdateLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{lake.name=projects/*/locations/*/lakes/*}" + body: "lake" + }; + option (google.api.method_signature) = "lake,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Lake" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a lake resource. All zones within the lake must be deleted before + // the lake can be deleted. + rpc DeleteLake(DeleteLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists lake resources in a project and location. + rpc ListLakes(ListLakesRequest) returns (ListLakesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/lakes" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a lake resource. + rpc GetLake(GetLakeRequest) returns (Lake) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in a lake. + rpc ListLakeActions(ListLakeActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a zone resource within a lake. + rpc CreateZone(CreateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + body: "zone" + }; + option (google.api.method_signature) = "parent,zone,zone_id"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Updates a zone resource. + rpc UpdateZone(UpdateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}" + body: "zone" + }; + option (google.api.method_signature) = "zone,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a zone resource. All assets within a zone must be deleted before + // the zone can be deleted. + rpc DeleteZone(DeleteZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists zone resources in a lake. + rpc ListZones(ListZonesRequest) returns (ListZonesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a zone resource. + rpc GetZone(GetZoneRequest) returns (Zone) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in a zone. + rpc ListZoneActions(ListZoneActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an asset resource. + rpc CreateAsset(CreateAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + body: "asset" + }; + option (google.api.method_signature) = "parent,asset,asset_id"; + option (google.longrunning.operation_info) = { + response_type: "Asset" + metadata_type: "OperationMetadata" + }; + } + + // Updates an asset resource. + rpc UpdateAsset(UpdateAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + body: "asset" + }; + option (google.api.method_signature) = "asset,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Asset" + metadata_type: "OperationMetadata" + }; + } + + // Deletes an asset resource. The referenced storage resource is detached + // (default) or deleted based on the associated Lifecycle policy. + rpc DeleteAsset(DeleteAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists asset resources in a zone. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves an asset resource. + rpc GetAsset(GetAssetRequest) returns (Asset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in an asset. + rpc ListAssetActions(ListAssetActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a task resource within a lake. + rpc CreateTask(CreateTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + body: "task" + }; + option (google.api.method_signature) = "parent,task,task_id"; + option (google.longrunning.operation_info) = { + response_type: "Task" + metadata_type: "OperationMetadata" + }; + } + + // Update the task resource. + rpc UpdateTask(UpdateTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}" + body: "task" + }; + option (google.api.method_signature) = "task,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Task" + metadata_type: "OperationMetadata" + }; + } + + // Delete the task resource. + rpc DeleteTask(DeleteTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists tasks under the given lake. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + }; + option (google.api.method_signature) = "parent"; + } + + // Get task resource. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Jobs under the given task. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Get job resource. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Cancel jobs running for the task resource. + rpc CancelJob(CancelJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Create lake request. +message CreateLakeRequest { + // Required. The resource name of the lake location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Lake identifier. + // This ID will be used to generate names such as database and dataset names + // when publishing metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the customer project / location. + string lake_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Lake resource + Lake lake = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update lake request. +message UpdateLakeRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Lake lake = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete lake request. +message DeleteLakeRequest { + // Required. The resource name of the lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; +} + +// List lakes request. +message ListLakesRequest { + // Required. The resource name of the lake location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of Lakes to return. The service may return fewer than this + // value. If unspecified, at most 10 lakes will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListLakes` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListLakes` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List lakes response. +message ListLakesResponse { + // Lakes under the given parent location. + repeated Lake lakes = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// List lake actions request. +message ListLakeActionsRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer than this + // value. If unspecified, at most 10 actions will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListLakeActions` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListLakeActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List actions response. +message ListActionsResponse { + // Actions under the given parent lake/zone/asset. + repeated Action actions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get lake request. +message GetLakeRequest { + // Required. The resource name of the lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; +} + +// Create zone request. +message CreateZoneRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Required. Zone identifier. + // This ID will be used to generate names such as database and dataset names + // when publishing metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique across all lakes from all locations in a project. + // * Must not be one of the reserved IDs (i.e. "default", "global-temp") + string zone_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Zone resource. + Zone zone = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update zone request. +message UpdateZoneRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Zone zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete zone request. +message DeleteZoneRequest { + // Required. The resource name of the zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; +} + +// List zones request. +message ListZonesRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of zones to return. The service may return fewer than this + // value. If unspecified, at most 10 zones will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZones` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZones` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List zones response. +message ListZonesResponse { + // Zones under the given parent lake. + repeated Zone zones = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// List zone actions request. +message ListZoneActionsRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer than this + // value. If unspecified, at most 10 actions will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZoneActions` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZoneActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get zone request. +message GetZoneRequest { + // Required. The resource name of the zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; +} + +// Create asset request. +message CreateAssetRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Required. Asset identifier. + // This ID will be used to generate names such as table names when publishing + // metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the zone. + string asset_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Asset resource. + Asset asset = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update asset request. +message UpdateAssetRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Asset asset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete asset request. +message DeleteAssetRequest { + // Required. The resource name of the asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; +} + +// List assets request. +message ListAssetsRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Optional. Maximum number of asset to return. The service may return fewer than + // this value. If unspecified, at most 10 assets will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListAssets` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListAssets` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List assets response. +message ListAssetsResponse { + // Asset under the given parent zone. + repeated Asset assets = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// List asset actions request. +message ListAssetActionsRequest { + // Required. The resource name of the parent asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer than this + // value. If unspecified, at most 10 actions will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListAssetActions` call. Provide this + // to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListAssetActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get asset request. +message GetAssetRequest { + // Required. The resource name of the asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; +} + +// Represents the metadata of a 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 successfully been cancelled + // 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]; +} + +// Create task request. +message CreateTaskRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Required. Task identifier. + string task_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Task resource. + Task task = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update task request. +message UpdateTaskRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Task task = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete task request. +message DeleteTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; +} + +// List tasks request. +message ListTasksRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of tasks to return. The service may return fewer than this + // value. If unspecified, at most 10 tasks will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZones` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZones` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List tasks response. +message ListTasksResponse { + // Tasks under the given parent lake. + repeated Task tasks = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Get task request. +message GetTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; +} + +// Get job request. +message GetJobRequest { + // Required. The resource name of the job: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Job" + } + ]; +} + +// List jobs request. +message ListJobsRequest { + // Required. The resource name of the parent environment: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; + + // Optional. Maximum number of jobs to return. The service may return fewer than + // this value. If unspecified, at most 10 jobs will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListJobs` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListJobs` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List jobs response. +message ListJobsResponse { + // Jobs under a given task. + repeated Job jobs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Cancel task jobs. +message CancelJobRequest { + // Required. The resource name of the job: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Job" + } + ]; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto new file mode 100644 index 00000000000..c716944c65f --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto @@ -0,0 +1,344 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "TasksProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// A task represents a user-visible job. +message Task { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Task" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" + }; + + // Configuration for the underlying infrastructure used to run workloads. + message InfrastructureSpec { + // Batch compute resources associated with the task. + message BatchComputeResources { + // Optional. Total number of job executors. + int32 executors_count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Max configurable executors. + // If max_executors_count > executors_count, then auto-scaling is enabled. + int32 max_executors_count = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Container Image Runtime Configuration used with Batch execution. + message ContainerImageRuntime { + // Optional. A list of Java JARS to add to the classpath. + // Valid input includes Cloud Storage URIs to Jar binaries. + // For example, `gs://bucket-name/my/path/to/file.jar`. + repeated string java_jars = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of python packages to be installed. + // Valid formats include Cloud Storage URI to a PIP installable library. + // For example, `gs://bucket-name/my/path/to/lib.tar.gz`. + repeated string python_packages = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Override to common configuration of open source components installed on + // the Dataproc cluster. + // The properties to set on daemon config files. + // Property keys are specified in `prefix:property` format, for example + // `core:hadoop.tmp.dir`. + // For more information, see [Cluster + // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + map properties = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Cloud VPC Network used to run the infrastructure. + message VpcNetwork { + // The Cloud VPC network identifier. + oneof network_name { + // Optional. The Cloud VPC network in which the job is run. By default, the Cloud + // VPC network named Default within the project is used. + string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud VPC sub-network in which the job is run. + string sub_network = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. List of network tags to apply to the job. + repeated string network_tags = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Hardware config. + oneof resources { + // Compute resources needed for a Task when using Dataproc Serverless. + BatchComputeResources batch = 52; + } + + // Software config. + oneof runtime { + // Container Image Runtime Configuration. + ContainerImageRuntime container_image = 101; + } + + // Networking config. + oneof network { + // Vpc network. + VpcNetwork vpc_network = 150; + } + } + + // Task scheduling and trigger settings. + message TriggerSpec { + // Determines how often and when the job will run. + enum Type { + // Unspecified trigger type. + TYPE_UNSPECIFIED = 0; + + // The task runs one-time shortly after Task Creation. + ON_DEMAND = 1; + + // The task is scheduled to run periodically. + RECURRING = 2; + } + + // Required. Immutable. Trigger type of the user-specified Task. + Type type = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The first run of the task will be after this time. + // If not specified, the task will run shortly after being submitted if + // ON_DEMAND and based on the schedule if RECURRING. + google.protobuf.Timestamp start_time = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Prevent the task from executing. + // This does not cancel already running tasks. It is intended to temporarily + // disable RECURRING tasks. + bool disabled = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of retry attempts before aborting. + // Set to zero to never attempt to retry a failed task. + int32 max_retries = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Trigger only applies for `RECURRING` tasks. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // tasks periodically. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + // This field is required for RECURRING tasks. + string schedule = 100 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Execution related settings, like retry and service_account. + message ExecutionSpec { + // Optional. The arguments to pass to the task. + // The args can use placeholders of the format ${placeholder} as + // part of key/value string. These will be interpolated before passing the + // args to the driver. Currently supported placeholders: + // - ${task_id} + // - ${job_time} + // To pass positional args, set the key as TASK_ARGS. The value should be a + // comma-separated string of all the positional arguments. To use a + // delimiter other than comma, refer to + // https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + // other keys being present in the args, then TASK_ARGS will be passed as + // the last argument. + map args = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Service account to use to execute a task. + // If not provided, the default Compute service account for the project is + // used. + string service_account = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum duration after which the job execution is expired. + google.protobuf.Duration max_job_execution_lifetime = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // User-specified config for running a Spark task. + message SparkTaskConfig { + // Required. The specification of the main method to call to drive the + // job. Specify either the jar file that contains the main class or the + // main class name. + oneof driver { + // The Cloud Storage URI of the jar file that contains the main class. + // The execution args are passed in as a sequence of named process + // arguments (`--key=value`). + string main_jar_file_uri = 100; + + // The name of the driver's main class. The jar file that contains the + // class must be in the default CLASSPATH or specified in + // `jar_file_uris`. + // The execution args are passed in as a sequence of named process + // arguments (`--key=value`). + string main_class = 101; + + // The Gcloud Storage URI of the main Python file to use as the driver. + // Must be a .py file. The execution args are passed in as a sequence of + // named process arguments (`--key=value`). + string python_script_file = 102; + + // A reference to a query file. This can be the Cloud Storage URI of the + // query file or it can the path to a SqlScript Content. The execution + // args are used to declare a set of script variables + // (`set key="value";`). + string sql_script_file = 104; + + // The query text. + // The execution args are used to declare a set of script variables + // (`set key="value";`). + string sql_script = 105; + } + + // Optional. Cloud Storage URIs of files to be placed in the working directory of each + // executor. + repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of archives to be extracted into the working directory + // of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and + // .zip. + repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Infrastructure specification for the execution. + InfrastructureSpec infrastructure_spec = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. The relative resource name of the task, of the form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + // tasks/{task_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; + + // Output only. System generated globally unique ID for the task. This ID will be + // different if the task is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the task was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the task was last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the task. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the task. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for the task. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Spec related to how often and when a task should be triggered. + TriggerSpec trigger_spec = 100 [(google.api.field_behavior) = REQUIRED]; + + // Required. Spec related to how a task is executed. + ExecutionSpec execution_spec = 101 [(google.api.field_behavior) = REQUIRED]; + + // Task template specific user-specified config. + oneof config { + // Config related to running custom Spark tasks. + SparkTaskConfig spark = 300; + } +} + +// A job represents an instance of a task. +message Job { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + }; + + enum Service { + // Service used to run the job is unspecified. + SERVICE_UNSPECIFIED = 0; + + // Dataproc service is used to run this job. + DATAPROC = 1; + } + + enum State { + // The job state is unknown. + STATE_UNSPECIFIED = 0; + + // The job is running. + RUNNING = 1; + + // The job is cancelling. + CANCELLING = 2; + + // The job cancellation was successful. + CANCELLED = 3; + + // The job completed successfully. + SUCCEEDED = 4; + + // The job is no longer running due to an error. + FAILED = 5; + + // The job was cancelled outside of Dataplex. + ABORTED = 6; + } + + // Output only. The relative resource name of the job, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Job" + } + ]; + + // Output only. System generated globally unique ID for the job. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the job was started. + google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the job ended. + google.protobuf.Timestamp end_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Execution state for the job. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of times the job has been retried (excluding the + // initial attempt). + uint32 retry_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The underlying service running a job. + Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The full resource name for the job run under a particular service. + string service_job = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state. + string message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts new file mode 100644 index 00000000000..e8042eff9e4 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -0,0 +1,16206 @@ +// 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. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace dataplex. */ + namespace dataplex { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a DiscoveryEvent. */ + interface IDiscoveryEvent { + + /** DiscoveryEvent message */ + message?: (string|null); + + /** DiscoveryEvent lakeId */ + lakeId?: (string|null); + + /** DiscoveryEvent zoneId */ + zoneId?: (string|null); + + /** DiscoveryEvent assetId */ + assetId?: (string|null); + + /** DiscoveryEvent dataLocation */ + dataLocation?: (string|null); + + /** DiscoveryEvent type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); + + /** DiscoveryEvent config */ + config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity */ + entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition */ + partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action */ + action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + } + + /** Represents a DiscoveryEvent. */ + class DiscoveryEvent implements IDiscoveryEvent { + + /** + * Constructs a new DiscoveryEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); + + /** DiscoveryEvent message. */ + public message: string; + + /** DiscoveryEvent lakeId. */ + public lakeId: string; + + /** DiscoveryEvent zoneId. */ + public zoneId: string; + + /** DiscoveryEvent assetId. */ + public assetId: string; + + /** DiscoveryEvent dataLocation. */ + public dataLocation: string; + + /** DiscoveryEvent type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + + /** DiscoveryEvent config. */ + public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity. */ + public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition. */ + public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action. */ + public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + + /** DiscoveryEvent details. */ + public details?: ("config"|"entity"|"partition"|"action"); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Verifies a DiscoveryEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @param message DiscoveryEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoveryEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + CONFIG = 1, + ENTITY_CREATED = 2, + ENTITY_UPDATED = 3, + ENTITY_DELETED = 4, + PARTITION_CREATED = 5, + PARTITION_UPDATED = 6, + PARTITION_DELETED = 7 + } + + /** EntityType enum. */ + enum EntityType { + ENTITY_TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a ConfigDetails. */ + interface IConfigDetails { + + /** ConfigDetails parameters */ + parameters?: ({ [k: string]: string }|null); + } + + /** Represents a ConfigDetails. */ + class ConfigDetails implements IConfigDetails { + + /** + * Constructs a new ConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + + /** ConfigDetails parameters. */ + public parameters: { [k: string]: string }; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Verifies a ConfigDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @param message ConfigDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EntityDetails. */ + interface IEntityDetails { + + /** EntityDetails entity */ + entity?: (string|null); + + /** EntityDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + } + + /** Represents an EntityDetails. */ + class EntityDetails implements IEntityDetails { + + /** + * Constructs a new EntityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + + /** EntityDetails entity. */ + public entity: string; + + /** EntityDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** + * Creates a new EntityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Verifies an EntityDetails message. + * @param message Plain 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 EntityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @param message EntityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartitionDetails. */ + interface IPartitionDetails { + + /** PartitionDetails partition */ + partition?: (string|null); + + /** PartitionDetails entity */ + entity?: (string|null); + + /** PartitionDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + } + + /** Represents a PartitionDetails. */ + class PartitionDetails implements IPartitionDetails { + + /** + * Constructs a new PartitionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); + + /** PartitionDetails partition. */ + public partition: string; + + /** PartitionDetails entity. */ + public entity: string; + + /** PartitionDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Verifies a PartitionDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @param message PartitionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ActionDetails. */ + interface IActionDetails { + + /** ActionDetails type */ + type?: (string|null); + } + + /** Represents an ActionDetails. */ + class ActionDetails implements IActionDetails { + + /** + * Constructs a new ActionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); + + /** ActionDetails type. */ + public type: string; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ActionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Verifies an ActionDetails message. + * @param message Plain 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 ActionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @param message ActionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a JobEvent. */ + interface IJobEvent { + + /** JobEvent message */ + message?: (string|null); + + /** JobEvent jobId */ + jobId?: (string|null); + + /** JobEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent state */ + state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); + + /** JobEvent retries */ + retries?: (number|null); + + /** JobEvent type */ + type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); + + /** JobEvent service */ + service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); + + /** JobEvent serviceJob */ + serviceJob?: (string|null); + } + + /** Represents a JobEvent. */ + class JobEvent implements IJobEvent { + + /** + * Constructs a new JobEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJobEvent); + + /** JobEvent message. */ + public message: string; + + /** JobEvent jobId. */ + public jobId: string; + + /** JobEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent state. */ + public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); + + /** JobEvent retries. */ + public retries: number; + + /** JobEvent type. */ + public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + + /** JobEvent service. */ + public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + + /** JobEvent serviceJob. */ + public serviceJob: string; + + /** + * Creates a new JobEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns JobEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.JobEvent; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.JobEvent; + + /** + * Verifies a JobEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @param message JobEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace JobEvent { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SPARK = 1, + NOTEBOOK = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + CANCELLED = 3, + ABORTED = 4 + } + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + } + + /** Properties of a SessionEvent. */ + interface ISessionEvent { + + /** SessionEvent message */ + message?: (string|null); + + /** SessionEvent userId */ + userId?: (string|null); + + /** SessionEvent sessionId */ + sessionId?: (string|null); + + /** SessionEvent type */ + type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); + + /** SessionEvent query */ + query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + } + + /** Represents a SessionEvent. */ + class SessionEvent implements ISessionEvent { + + /** + * Constructs a new SessionEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); + + /** SessionEvent message. */ + public message: string; + + /** SessionEvent userId. */ + public userId: string; + + /** SessionEvent sessionId. */ + public sessionId: string; + + /** SessionEvent type. */ + public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); + + /** SessionEvent query. */ + public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + + /** SessionEvent detail. */ + public detail?: "query"; + + /** + * Creates a new SessionEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; + + /** + * Verifies a SessionEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @param message SessionEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SessionEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + START = 1, + STOP = 2, + QUERY = 3 + } + + /** Properties of a QueryDetail. */ + interface IQueryDetail { + + /** QueryDetail queryId */ + queryId?: (string|null); + + /** QueryDetail queryText */ + queryText?: (string|null); + + /** QueryDetail engine */ + engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + + /** QueryDetail duration */ + duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes */ + resultSizeBytes?: (number|Long|string|null); + + /** QueryDetail dataProcessedBytes */ + dataProcessedBytes?: (number|Long|string|null); + } + + /** Represents a QueryDetail. */ + class QueryDetail implements IQueryDetail { + + /** + * Constructs a new QueryDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + + /** QueryDetail queryId. */ + public queryId: string; + + /** QueryDetail queryText. */ + public queryText: string; + + /** QueryDetail engine. */ + public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + + /** QueryDetail duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes. */ + public resultSizeBytes: (number|Long|string); + + /** QueryDetail dataProcessedBytes. */ + public dataProcessedBytes: (number|Long|string); + + /** + * Creates a new QueryDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDetail instance + */ + public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Verifies a QueryDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @param message QueryDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace QueryDetail { + + /** Engine enum. */ + enum Engine { + ENGINE_UNSPECIFIED = 0, + SPARK_SQL = 1, + BIGQUERY = 2 + } + } + } + + /** Represents a MetadataService */ + class MetadataService extends $protobuf.rpc.Service { + + /** + * Constructs a new MetadataService 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 MetadataService 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): MetadataService; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @returns Promise + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @returns Promise + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @returns Promise + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @returns Promise + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; + } + + namespace MetadataService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * @param error Error, if any + * @param [response] ListEntitiesResponse + */ + type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * @param error Error, if any + * @param [response] Partition + */ + type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * @param error Error, if any + * @param [response] ListPartitionsResponse + */ + type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; + } + + /** Properties of a ListEntitiesRequest. */ + interface IListEntitiesRequest { + + /** ListEntitiesRequest parent */ + parent?: (string|null); + + /** ListEntitiesRequest view */ + view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); + + /** ListEntitiesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntitiesRequest pageToken */ + pageToken?: (string|null); + + /** ListEntitiesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListEntitiesRequest. */ + class ListEntitiesRequest implements IListEntitiesRequest { + + /** + * Constructs a new ListEntitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); + + /** ListEntitiesRequest parent. */ + public parent: string; + + /** ListEntitiesRequest view. */ + public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); + + /** ListEntitiesRequest pageSize. */ + public pageSize: number; + + /** ListEntitiesRequest pageToken. */ + public pageToken: string; + + /** ListEntitiesRequest filter. */ + public filter: string; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Verifies a ListEntitiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @param message ListEntitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ListEntitiesRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + TABLES = 1, + FILESETS = 2 + } + } + + /** Properties of a ListEntitiesResponse. */ + interface IListEntitiesResponse { + + /** ListEntitiesResponse entities */ + entities?: (google.cloud.dataplex.v1.IEntity[]|null); + + /** ListEntitiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEntitiesResponse. */ + class ListEntitiesResponse implements IListEntitiesResponse { + + /** + * Constructs a new ListEntitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); + + /** ListEntitiesResponse entities. */ + public entities: google.cloud.dataplex.v1.IEntity[]; + + /** ListEntitiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Verifies a ListEntitiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @param message ListEntitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetEntityRequest. */ + interface IGetEntityRequest { + + /** GetEntityRequest name */ + name?: (string|null); + + /** GetEntityRequest view */ + view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); + } + + /** Represents a GetEntityRequest. */ + class GetEntityRequest implements IGetEntityRequest { + + /** + * Constructs a new GetEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); + + /** GetEntityRequest name. */ + public name: string; + + /** GetEntityRequest view. */ + public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Verifies a GetEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @param message GetEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GetEntityRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + SCHEMA = 2, + FULL = 4 + } + } + + /** Properties of a ListPartitionsRequest. */ + interface IListPartitionsRequest { + + /** ListPartitionsRequest parent */ + parent?: (string|null); + + /** ListPartitionsRequest pageSize */ + pageSize?: (number|null); + + /** ListPartitionsRequest pageToken */ + pageToken?: (string|null); + + /** ListPartitionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPartitionsRequest. */ + class ListPartitionsRequest implements IListPartitionsRequest { + + /** + * Constructs a new ListPartitionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); + + /** ListPartitionsRequest parent. */ + public parent: string; + + /** ListPartitionsRequest pageSize. */ + public pageSize: number; + + /** ListPartitionsRequest pageToken. */ + public pageToken: string; + + /** ListPartitionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Verifies a ListPartitionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @param message ListPartitionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPartitionsResponse. */ + interface IListPartitionsResponse { + + /** ListPartitionsResponse partitions */ + partitions?: (google.cloud.dataplex.v1.IPartition[]|null); + + /** ListPartitionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPartitionsResponse. */ + class ListPartitionsResponse implements IListPartitionsResponse { + + /** + * Constructs a new ListPartitionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); + + /** ListPartitionsResponse partitions. */ + public partitions: google.cloud.dataplex.v1.IPartition[]; + + /** ListPartitionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Verifies a ListPartitionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @param message ListPartitionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPartitionRequest. */ + interface IGetPartitionRequest { + + /** GetPartitionRequest name */ + name?: (string|null); + } + + /** Represents a GetPartitionRequest. */ + class GetPartitionRequest implements IGetPartitionRequest { + + /** + * Constructs a new GetPartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); + + /** GetPartitionRequest name. */ + public name: string; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Verifies a GetPartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @param message GetPartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity name */ + name?: (string|null); + + /** Entity displayName */ + displayName?: (string|null); + + /** Entity description */ + description?: (string|null); + + /** Entity createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id */ + id?: (string|null); + + /** Entity etag */ + etag?: (string|null); + + /** Entity type */ + type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); + + /** Entity asset */ + asset?: (string|null); + + /** Entity dataPath */ + dataPath?: (string|null); + + /** Entity dataPathPattern */ + dataPathPattern?: (string|null); + + /** Entity catalogEntry */ + catalogEntry?: (string|null); + + /** Entity system */ + system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); + + /** Entity format */ + format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility */ + compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity schema */ + schema?: (google.cloud.dataplex.v1.ISchema|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntity); + + /** Entity name. */ + public name: string; + + /** Entity displayName. */ + public displayName: string; + + /** Entity description. */ + public description: string; + + /** Entity createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id. */ + public id: string; + + /** Entity etag. */ + public etag: string; + + /** Entity type. */ + public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); + + /** Entity asset. */ + public asset: string; + + /** Entity dataPath. */ + public dataPath: string; + + /** Entity dataPathPattern. */ + public dataPathPattern: string; + + /** Entity catalogEntry. */ + public catalogEntry: string; + + /** Entity system. */ + public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); + + /** Entity format. */ + public format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility. */ + public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity schema. */ + public schema?: (google.cloud.dataplex.v1.ISchema|null); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity; + + /** + * Verifies an Entity message. + * @param message Plain 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 Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Entity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a CompatibilityStatus. */ + interface ICompatibilityStatus { + + /** CompatibilityStatus hiveMetastore */ + hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery */ + bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + } + + /** Represents a CompatibilityStatus. */ + class CompatibilityStatus implements ICompatibilityStatus { + + /** + * Constructs a new CompatibilityStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); + + /** CompatibilityStatus hiveMetastore. */ + public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery. */ + public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns CompatibilityStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Verifies a CompatibilityStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompatibilityStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @param message CompatibilityStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompatibilityStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompatibilityStatus { + + /** Properties of a Compatibility. */ + interface ICompatibility { + + /** Compatibility compatible */ + compatible?: (boolean|null); + + /** Compatibility reason */ + reason?: (string|null); + } + + /** Represents a Compatibility. */ + class Compatibility implements ICompatibility { + + /** + * Constructs a new Compatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); + + /** Compatibility compatible. */ + public compatible: boolean; + + /** Compatibility reason. */ + public reason: string; + + /** + * Creates a new Compatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns Compatibility instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Verifies a Compatibility message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Compatibility + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @param message Compatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Compatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Properties of a Partition. */ + interface IPartition { + + /** Partition name */ + name?: (string|null); + + /** Partition values */ + values?: (string[]|null); + + /** Partition location */ + location?: (string|null); + + /** Partition etag */ + etag?: (string|null); + } + + /** Represents a Partition. */ + class Partition implements IPartition { + + /** + * Constructs a new Partition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IPartition); + + /** Partition name. */ + public name: string; + + /** Partition values. */ + public values: string[]; + + /** Partition location. */ + public location: string; + + /** Partition etag. */ + public etag: string; + + /** + * Creates a new Partition instance using the specified properties. + * @param [properties] Properties to set + * @returns Partition instance + */ + public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Partition; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Partition; + + /** + * Verifies a Partition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Partition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @param message Partition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Partition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema userManaged */ + userManaged?: (boolean|null); + + /** Schema fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + + /** Schema partitionFields */ + partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); + + /** Schema partitionStyle */ + partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISchema); + + /** Schema userManaged. */ + public userManaged: boolean; + + /** Schema fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** Schema partitionFields. */ + public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; + + /** Schema partitionStyle. */ + public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema; + + /** + * Verifies a Schema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Schema { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + BOOLEAN = 1, + BYTE = 2, + INT16 = 3, + INT32 = 4, + INT64 = 5, + FLOAT = 6, + DOUBLE = 7, + DECIMAL = 8, + STRING = 9, + BINARY = 10, + TIMESTAMP = 11, + DATE = 12, + TIME = 13, + RECORD = 14, + NULL = 100 + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + REQUIRED = 1, + NULLABLE = 2, + REPEATED = 3 + } + + /** Properties of a SchemaField. */ + interface ISchemaField { + + /** SchemaField name */ + name?: (string|null); + + /** SchemaField description */ + description?: (string|null); + + /** SchemaField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + + /** SchemaField mode */ + mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); + + /** SchemaField fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + } + + /** Represents a SchemaField. */ + class SchemaField implements ISchemaField { + + /** + * Constructs a new SchemaField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); + + /** SchemaField name. */ + public name: string; + + /** SchemaField description. */ + public description: string; + + /** SchemaField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** SchemaField mode. */ + public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); + + /** SchemaField fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** + * Creates a new SchemaField instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Verifies a SchemaField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @param message SchemaField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartitionField. */ + interface IPartitionField { + + /** PartitionField name */ + name?: (string|null); + + /** PartitionField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + } + + /** Represents a PartitionField. */ + class PartitionField implements IPartitionField { + + /** + * Constructs a new PartitionField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); + + /** PartitionField name. */ + public name: string; + + /** PartitionField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** + * Creates a new PartitionField instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Verifies a PartitionField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @param message PartitionField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** PartitionStyle enum. */ + enum PartitionStyle { + PARTITION_STYLE_UNSPECIFIED = 0, + HIVE_COMPATIBLE = 1 + } + } + + /** Properties of a StorageFormat. */ + interface IStorageFormat { + + /** StorageFormat format */ + format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); + + /** StorageFormat compressionFormat */ + compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); + + /** StorageFormat mimeType */ + mimeType?: (string|null); + + /** StorageFormat csv */ + csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json */ + json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + } + + /** Represents a StorageFormat. */ + class StorageFormat implements IStorageFormat { + + /** + * Constructs a new StorageFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); + + /** StorageFormat format. */ + public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); + + /** StorageFormat compressionFormat. */ + public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); + + /** StorageFormat mimeType. */ + public mimeType: string; + + /** StorageFormat csv. */ + public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json. */ + public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat options. */ + public options?: ("csv"|"json"); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat; + + /** + * Verifies a StorageFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; + + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @param message StorageFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StorageFormat { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions quote */ + quote?: (string|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions quote. */ + public quote: string; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + PARQUET = 1, + AVRO = 2, + ORC = 3, + CSV = 100, + JSON = 101, + IMAGE = 200, + AUDIO = 201, + VIDEO = 202, + TEXT = 203, + TFRECORD = 204, + OTHER = 1000, + UNKNOWN = 1001 + } + + /** CompressionFormat enum. */ + enum CompressionFormat { + COMPRESSION_FORMAT_UNSPECIFIED = 0, + GZIP = 2, + BZIP2 = 3 + } + } + + /** StorageSystem enum. */ + enum StorageSystem { + STORAGE_SYSTEM_UNSPECIFIED = 0, + CLOUD_STORAGE = 1, + BIGQUERY = 2 + } + + /** Properties of a Lake. */ + interface ILake { + + /** Lake name */ + name?: (string|null); + + /** Lake displayName */ + displayName?: (string|null); + + /** Lake uid */ + uid?: (string|null); + + /** Lake createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Lake updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Lake labels */ + labels?: ({ [k: string]: string }|null); + + /** Lake description */ + description?: (string|null); + + /** Lake state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + + /** Lake serviceAccount */ + serviceAccount?: (string|null); + + /** Lake metastore */ + metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + + /** Lake assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** Lake metastoreStatus */ + metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + } + + /** Represents a Lake. */ + class Lake implements ILake { + + /** + * Constructs a new Lake. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ILake); + + /** Lake name. */ + public name: string; + + /** Lake displayName. */ + public displayName: string; + + /** Lake uid. */ + public uid: string; + + /** Lake createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Lake updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Lake labels. */ + public labels: { [k: string]: string }; + + /** Lake description. */ + public description: string; + + /** Lake state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + + /** Lake serviceAccount. */ + public serviceAccount: string; + + /** Lake metastore. */ + public metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + + /** Lake assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** Lake metastoreStatus. */ + public metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + + /** + * Creates a new Lake instance using the specified properties. + * @param [properties] Properties to set + * @returns Lake instance + */ + public static create(properties?: google.cloud.dataplex.v1.ILake): google.cloud.dataplex.v1.Lake; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake; + + /** + * Verifies a Lake message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Lake + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @param message Lake + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Lake to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Lake { + + /** Properties of a Metastore. */ + interface IMetastore { + + /** Metastore service */ + service?: (string|null); + } + + /** Represents a Metastore. */ + class Metastore implements IMetastore { + + /** + * Constructs a new Metastore. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastore); + + /** Metastore service. */ + public service: string; + + /** + * Creates a new Metastore instance using the specified properties. + * @param [properties] Properties to set + * @returns Metastore instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastore): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metastore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Decodes a Metastore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Verifies a Metastore message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metastore + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @param message Metastore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake.Metastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metastore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MetastoreStatus. */ + interface IMetastoreStatus { + + /** MetastoreStatus state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + + /** MetastoreStatus message */ + message?: (string|null); + + /** MetastoreStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MetastoreStatus endpoint */ + endpoint?: (string|null); + } + + /** Represents a MetastoreStatus. */ + class MetastoreStatus implements IMetastoreStatus { + + /** + * Constructs a new MetastoreStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus); + + /** MetastoreStatus state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + + /** MetastoreStatus message. */ + public message: string; + + /** MetastoreStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MetastoreStatus endpoint. */ + public endpoint: string; + + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns MetastoreStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Verifies a MetastoreStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetastoreStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @param message MetastoreStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake.MetastoreStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetastoreStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MetastoreStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + NONE = 1, + READY = 2, + UPDATING = 3, + ERROR = 4 + } + } + } + + /** Properties of an AssetStatus. */ + interface IAssetStatus { + + /** AssetStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AssetStatus activeAssets */ + activeAssets?: (number|null); + + /** AssetStatus securityPolicyApplyingAssets */ + securityPolicyApplyingAssets?: (number|null); + } + + /** Represents an AssetStatus. */ + class AssetStatus implements IAssetStatus { + + /** + * Constructs a new AssetStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAssetStatus); + + /** AssetStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AssetStatus activeAssets. */ + public activeAssets: number; + + /** AssetStatus securityPolicyApplyingAssets. */ + public securityPolicyApplyingAssets: number; + + /** + * Creates a new AssetStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAssetStatus): google.cloud.dataplex.v1.AssetStatus; + + /** + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssetStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AssetStatus; + + /** + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AssetStatus; + + /** + * Verifies an AssetStatus message. + * @param message Plain 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 AssetStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AssetStatus; + + /** + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. + * @param message AssetStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AssetStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssetStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Zone. */ + interface IZone { + + /** Zone name */ + name?: (string|null); + + /** Zone displayName */ + displayName?: (string|null); + + /** Zone uid */ + uid?: (string|null); + + /** Zone createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Zone updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Zone labels */ + labels?: ({ [k: string]: string }|null); + + /** Zone description */ + description?: (string|null); + + /** Zone state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Zone type */ + type?: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type|null); + + /** Zone discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + + /** Zone resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + + /** Zone assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + } + + /** Represents a Zone. */ + class Zone implements IZone { + + /** + * Constructs a new Zone. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IZone); + + /** Zone name. */ + public name: string; + + /** Zone displayName. */ + public displayName: string; + + /** Zone uid. */ + public uid: string; + + /** Zone createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Zone updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Zone labels. */ + public labels: { [k: string]: string }; + + /** Zone description. */ + public description: string; + + /** Zone state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Zone type. */ + public type: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type); + + /** Zone discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + + /** Zone resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + + /** Zone assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** + * Creates a new Zone instance using the specified properties. + * @param [properties] Properties to set + * @returns Zone instance + */ + public static create(properties?: google.cloud.dataplex.v1.IZone): google.cloud.dataplex.v1.Zone; + + /** + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Zone message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone; + + /** + * Decodes a Zone message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone; + + /** + * Verifies a Zone message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Zone message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Zone + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone; + + /** + * Creates a plain object from a Zone message. Also converts values to other types if specified. + * @param message Zone + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Zone to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Zone { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + RAW = 1, + CURATED = 2 + } + + /** Properties of a ResourceSpec. */ + interface IResourceSpec { + + /** ResourceSpec locationType */ + locationType?: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null); + } + + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { + + /** + * Constructs a new ResourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec); + + /** ResourceSpec locationType. */ + public locationType: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType); + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Verifies a ResourceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @param message ResourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceSpec { + + /** LocationType enum. */ + enum LocationType { + LOCATION_TYPE_UNSPECIFIED = 0, + SINGLE_REGION = 1, + MULTI_REGION = 2 + } + } + + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { + + /** DiscoverySpec enabled */ + enabled?: (boolean|null); + + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); + + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); + + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule */ + schedule?: (string|null); + } + + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { + + /** + * Constructs a new DiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec); + + /** DiscoverySpec enabled. */ + public enabled: boolean; + + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; + + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; + + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule. */ + public schedule?: (string|null); + + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Verifies a DiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoverySpec { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Properties of an Action. */ + interface IAction { + + /** Action category */ + category?: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category|null); + + /** Action issue */ + issue?: (string|null); + + /** Action detectTime */ + detectTime?: (google.protobuf.ITimestamp|null); + + /** Action name */ + name?: (string|null); + + /** Action lake */ + lake?: (string|null); + + /** Action zone */ + zone?: (string|null); + + /** Action asset */ + asset?: (string|null); + + /** Action dataLocations */ + dataLocations?: (string[]|null); + + /** Action invalidDataFormat */ + invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + + /** Action incompatibleDataSchema */ + incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + + /** Action invalidDataPartition */ + invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + + /** Action missingData */ + missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + + /** Action missingResource */ + missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + + /** Action unauthorizedResource */ + unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + + /** Action failedSecurityPolicyApply */ + failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + + /** Action invalidDataOrganization */ + invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + } + + /** Represents an Action. */ + class Action implements IAction { + + /** + * Constructs a new Action. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAction); + + /** Action category. */ + public category: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category); + + /** Action issue. */ + public issue: string; + + /** Action detectTime. */ + public detectTime?: (google.protobuf.ITimestamp|null); + + /** Action name. */ + public name: string; + + /** Action lake. */ + public lake: string; + + /** Action zone. */ + public zone: string; + + /** Action asset. */ + public asset: string; + + /** Action dataLocations. */ + public dataLocations: string[]; + + /** Action invalidDataFormat. */ + public invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + + /** Action incompatibleDataSchema. */ + public incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + + /** Action invalidDataPartition. */ + public invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + + /** Action missingData. */ + public missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + + /** Action missingResource. */ + public missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + + /** Action unauthorizedResource. */ + public unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + + /** Action failedSecurityPolicyApply. */ + public failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + + /** Action invalidDataOrganization. */ + public invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + + /** Action details. */ + public details?: ("invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"); + + /** + * Creates a new Action instance using the specified properties. + * @param [properties] Properties to set + * @returns Action instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAction): google.cloud.dataplex.v1.Action; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Action message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action; + + /** + * Verifies an Action message. + * @param message Plain 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 Action message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Action + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @param message Action + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Action to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Action { + + /** Category enum. */ + enum Category { + CATEGORY_UNSPECIFIED = 0, + RESOURCE_MANAGEMENT = 1, + SECURITY_POLICY = 2, + DATA_DISCOVERY = 3 + } + + /** Properties of a MissingResource. */ + interface IMissingResource { + } + + /** Represents a MissingResource. */ + class MissingResource implements IMissingResource { + + /** + * Constructs a new MissingResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingResource); + + /** + * Creates a new MissingResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MissingResource instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingResource): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MissingResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Decodes a MissingResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Verifies a MissingResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MissingResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @param message MissingResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.MissingResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MissingResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnauthorizedResource. */ + interface IUnauthorizedResource { + } + + /** Represents an UnauthorizedResource. */ + class UnauthorizedResource implements IUnauthorizedResource { + + /** + * Constructs a new UnauthorizedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource); + + /** + * Creates a new UnauthorizedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns UnauthorizedResource instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Verifies an UnauthorizedResource message. + * @param message Plain 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 UnauthorizedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnauthorizedResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. + * @param message UnauthorizedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.UnauthorizedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnauthorizedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FailedSecurityPolicyApply. */ + interface IFailedSecurityPolicyApply { + + /** FailedSecurityPolicyApply asset */ + asset?: (string|null); + } + + /** Represents a FailedSecurityPolicyApply. */ + class FailedSecurityPolicyApply implements IFailedSecurityPolicyApply { + + /** + * Constructs a new FailedSecurityPolicyApply. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply); + + /** FailedSecurityPolicyApply asset. */ + public asset: string; + + /** + * Creates a new FailedSecurityPolicyApply instance using the specified properties. + * @param [properties] Properties to set + * @returns FailedSecurityPolicyApply instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Verifies a FailedSecurityPolicyApply message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FailedSecurityPolicyApply + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. + * @param message FailedSecurityPolicyApply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FailedSecurityPolicyApply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InvalidDataFormat. */ + interface IInvalidDataFormat { + + /** InvalidDataFormat sampledDataLocations */ + sampledDataLocations?: (string[]|null); + + /** InvalidDataFormat expectedFormat */ + expectedFormat?: (string|null); + + /** InvalidDataFormat newFormat */ + newFormat?: (string|null); + } + + /** Represents an InvalidDataFormat. */ + class InvalidDataFormat implements IInvalidDataFormat { + + /** + * Constructs a new InvalidDataFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat); + + /** InvalidDataFormat sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** InvalidDataFormat expectedFormat. */ + public expectedFormat: string; + + /** InvalidDataFormat newFormat. */ + public newFormat: string; + + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Verifies an InvalidDataFormat message. + * @param message Plain 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 InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @param message InvalidDataFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an IncompatibleDataSchema. */ + interface IIncompatibleDataSchema { + + /** IncompatibleDataSchema table */ + table?: (string|null); + + /** IncompatibleDataSchema existingSchema */ + existingSchema?: (string|null); + + /** IncompatibleDataSchema newSchema */ + newSchema?: (string|null); + + /** IncompatibleDataSchema sampledDataLocations */ + sampledDataLocations?: (string[]|null); + + /** IncompatibleDataSchema schemaChange */ + schemaChange?: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null); + } + + /** Represents an IncompatibleDataSchema. */ + class IncompatibleDataSchema implements IIncompatibleDataSchema { + + /** + * Constructs a new IncompatibleDataSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema); + + /** IncompatibleDataSchema table. */ + public table: string; + + /** IncompatibleDataSchema existingSchema. */ + public existingSchema: string; + + /** IncompatibleDataSchema newSchema. */ + public newSchema: string; + + /** IncompatibleDataSchema sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** IncompatibleDataSchema schemaChange. */ + public schemaChange: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange); + + /** + * Creates a new IncompatibleDataSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns IncompatibleDataSchema instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Verifies an IncompatibleDataSchema message. + * @param message Plain 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 IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncompatibleDataSchema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. + * @param message IncompatibleDataSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.IncompatibleDataSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncompatibleDataSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace IncompatibleDataSchema { + + /** SchemaChange enum. */ + enum SchemaChange { + SCHEMA_CHANGE_UNSPECIFIED = 0, + INCOMPATIBLE = 1, + MODIFIED = 2 + } + } + + /** Properties of an InvalidDataPartition. */ + interface IInvalidDataPartition { + + /** InvalidDataPartition expectedStructure */ + expectedStructure?: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null); + } + + /** Represents an InvalidDataPartition. */ + class InvalidDataPartition implements IInvalidDataPartition { + + /** + * Constructs a new InvalidDataPartition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition); + + /** InvalidDataPartition expectedStructure. */ + public expectedStructure: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure); + + /** + * Creates a new InvalidDataPartition instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataPartition instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Verifies an InvalidDataPartition message. + * @param message Plain 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 InvalidDataPartition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataPartition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. + * @param message InvalidDataPartition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataPartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataPartition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InvalidDataPartition { + + /** PartitionStructure enum. */ + enum PartitionStructure { + PARTITION_STRUCTURE_UNSPECIFIED = 0, + CONSISTENT_KEYS = 1, + HIVE_STYLE_KEYS = 2 + } + } + + /** Properties of a MissingData. */ + interface IMissingData { + } + + /** Represents a MissingData. */ + class MissingData implements IMissingData { + + /** + * Constructs a new MissingData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingData); + + /** + * Creates a new MissingData instance using the specified properties. + * @param [properties] Properties to set + * @returns MissingData instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingData): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MissingData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Decodes a MissingData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Verifies a MissingData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MissingData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @param message MissingData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.MissingData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MissingData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InvalidDataOrganization. */ + interface IInvalidDataOrganization { + } + + /** Represents an InvalidDataOrganization. */ + class InvalidDataOrganization implements IInvalidDataOrganization { + + /** + * Constructs a new InvalidDataOrganization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization); + + /** + * Creates a new InvalidDataOrganization instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataOrganization instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Verifies an InvalidDataOrganization message. + * @param message Plain 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 InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataOrganization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @param message InvalidDataOrganization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataOrganization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Asset. */ + interface IAsset { + + /** Asset name */ + name?: (string|null); + + /** Asset displayName */ + displayName?: (string|null); + + /** Asset uid */ + uid?: (string|null); + + /** Asset createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Asset labels */ + labels?: ({ [k: string]: string }|null); + + /** Asset description */ + description?: (string|null); + + /** Asset state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + + /** Asset resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); + + /** Asset resourceStatus */ + resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); + + /** Asset securityStatus */ + securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); + + /** Asset discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus */ + discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); + } + + /** Represents an Asset. */ + class Asset implements IAsset { + + /** + * Constructs a new Asset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAsset); + + /** Asset name. */ + public name: string; + + /** Asset displayName. */ + public displayName: string; + + /** Asset uid. */ + public uid: string; + + /** Asset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Asset labels. */ + public labels: { [k: string]: string }; + + /** Asset description. */ + public description: string; + + /** Asset state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + + /** Asset resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); + + /** Asset resourceStatus. */ + public resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); + + /** Asset securityStatus. */ + public securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); + + /** Asset discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus. */ + public discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); + + /** + * Creates a new Asset instance using the specified properties. + * @param [properties] Properties to set + * @returns Asset instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAsset): google.cloud.dataplex.v1.Asset; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset; + + /** + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset; + + /** + * Verifies an Asset message. + * @param message Plain 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 Asset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Asset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Asset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Asset { + + /** Properties of a SecurityStatus. */ + interface ISecurityStatus { + + /** SecurityStatus state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + + /** SecurityStatus message */ + message?: (string|null); + + /** SecurityStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SecurityStatus. */ + class SecurityStatus implements ISecurityStatus { + + /** + * Constructs a new SecurityStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus); + + /** SecurityStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + + /** SecurityStatus message. */ + public message: string; + + /** SecurityStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SecurityStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Verifies a SecurityStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @param message SecurityStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.SecurityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SecurityStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + APPLYING = 2, + ERROR = 3 + } + } + + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { + + /** DiscoverySpec enabled */ + enabled?: (boolean|null); + + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); + + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); + + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule */ + schedule?: (string|null); + } + + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { + + /** + * Constructs a new DiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec); + + /** DiscoverySpec enabled. */ + public enabled: boolean; + + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; + + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; + + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule. */ + public schedule?: (string|null); + + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Verifies a DiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoverySpec { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ResourceSpec. */ + interface IResourceSpec { + + /** ResourceSpec name */ + name?: (string|null); + + /** ResourceSpec type */ + type?: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null); + } + + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { + + /** + * Constructs a new ResourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec); + + /** ResourceSpec name. */ + public name: string; + + /** ResourceSpec type. */ + public type: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type); + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Verifies a ResourceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @param message ResourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceSpec { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + STORAGE_BUCKET = 1, + BIGQUERY_DATASET = 2 + } + } + + /** Properties of a ResourceStatus. */ + interface IResourceStatus { + + /** ResourceStatus state */ + state?: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State|null); + + /** ResourceStatus message */ + message?: (string|null); + + /** ResourceStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ResourceStatus. */ + class ResourceStatus implements IResourceStatus { + + /** + * Constructs a new ResourceStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus); + + /** ResourceStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State); + + /** ResourceStatus message. */ + public message: string; + + /** ResourceStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ResourceStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Verifies a ResourceStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. + * @param message ResourceStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + ERROR = 2 + } + } + + /** Properties of a DiscoveryStatus. */ + interface IDiscoveryStatus { + + /** DiscoveryStatus state */ + state?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null); + + /** DiscoveryStatus message */ + message?: (string|null); + + /** DiscoveryStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime */ + lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats */ + stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration */ + lastRunDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a DiscoveryStatus. */ + class DiscoveryStatus implements IDiscoveryStatus { + + /** + * Constructs a new DiscoveryStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus); + + /** DiscoveryStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State); + + /** DiscoveryStatus message. */ + public message: string; + + /** DiscoveryStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime. */ + public lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats. */ + public stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration. */ + public lastRunDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new DiscoveryStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Verifies a DiscoveryStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. + * @param message DiscoveryStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoveryStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SCHEDULED = 1, + IN_PROGRESS = 2, + PAUSED = 3, + DISABLED = 5 + } + + /** Properties of a Stats. */ + interface IStats { + + /** Stats dataItems */ + dataItems?: (number|Long|string|null); + + /** Stats dataSize */ + dataSize?: (number|Long|string|null); + + /** Stats tables */ + tables?: (number|Long|string|null); + + /** Stats filesets */ + filesets?: (number|Long|string|null); + } + + /** Represents a Stats. */ + class Stats implements IStats { + + /** + * Constructs a new Stats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats); + + /** Stats dataItems. */ + public dataItems: (number|Long|string); + + /** Stats dataSize. */ + public dataSize: (number|Long|string); + + /** Stats tables. */ + public tables: (number|Long|string); + + /** Stats filesets. */ + public filesets: (number|Long|string); + + /** + * Creates a new Stats instance using the specified properties. + * @param [properties] Properties to set + * @returns Stats instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Stats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Decodes a Stats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Verifies a Stats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Stats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Stats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Creates a plain object from a Stats message. Also converts values to other types if specified. + * @param message Stats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Stats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + CREATING = 2, + DELETING = 3, + ACTION_REQUIRED = 4 + } + + /** Represents a DataplexService */ + class DataplexService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataplexService 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 DataplexService 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): DataplexService; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @returns Promise + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @returns Promise + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @returns Promise + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLakesResponse + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @returns Promise + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Lake + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @returns Promise + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @returns Promise + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @returns Promise + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @returns Promise + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @returns Promise + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListZonesResponse + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @returns Promise + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Zone + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @returns Promise + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @returns Promise + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @returns Promise + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @returns Promise + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @returns Promise + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Asset + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @returns Promise + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @returns Promise + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @returns Promise + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @returns Promise + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @returns Promise + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTasksResponse + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @returns Promise + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Task + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @returns Promise + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @returns Promise + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; + } + + namespace DataplexService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * @param error Error, if any + * @param [response] ListLakesResponse + */ + type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * @param error Error, if any + * @param [response] Lake + */ + type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * @param error Error, if any + * @param [response] ListZonesResponse + */ + type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * @param error Error, if any + * @param [response] Zone + */ + type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse + */ + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * @param error Error, if any + * @param [response] Asset + */ + type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * @param error Error, if any + * @param [response] ListTasksResponse + */ + type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * @param error Error, if any + * @param [response] Task + */ + type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * @param error Error, if any + * @param [response] ListJobsResponse + */ + type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * @param error Error, if any + * @param [response] Job + */ + type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a CreateLakeRequest. */ + interface ICreateLakeRequest { + + /** CreateLakeRequest parent */ + parent?: (string|null); + + /** CreateLakeRequest lakeId */ + lakeId?: (string|null); + + /** CreateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); + + /** CreateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateLakeRequest. */ + class CreateLakeRequest implements ICreateLakeRequest { + + /** + * Constructs a new CreateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); + + /** CreateLakeRequest parent. */ + public parent: string; + + /** CreateLakeRequest lakeId. */ + public lakeId: string; + + /** CreateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); + + /** CreateLakeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Verifies a CreateLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @param message CreateLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateLakeRequest. */ + interface IUpdateLakeRequest { + + /** UpdateLakeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); + + /** UpdateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateLakeRequest. */ + class UpdateLakeRequest implements IUpdateLakeRequest { + + /** + * Constructs a new UpdateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); + + /** UpdateLakeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); + + /** UpdateLakeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Verifies an UpdateLakeRequest message. + * @param message Plain 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 UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @param message UpdateLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteLakeRequest. */ + interface IDeleteLakeRequest { + + /** DeleteLakeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteLakeRequest. */ + class DeleteLakeRequest implements IDeleteLakeRequest { + + /** + * Constructs a new DeleteLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); + + /** DeleteLakeRequest name. */ + public name: string; + + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Verifies a DeleteLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @param message DeleteLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakesRequest. */ + interface IListLakesRequest { + + /** ListLakesRequest parent */ + parent?: (string|null); + + /** ListLakesRequest pageSize */ + pageSize?: (number|null); + + /** ListLakesRequest pageToken */ + pageToken?: (string|null); + + /** ListLakesRequest filter */ + filter?: (string|null); + + /** ListLakesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListLakesRequest. */ + class ListLakesRequest implements IListLakesRequest { + + /** + * Constructs a new ListLakesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); + + /** ListLakesRequest parent. */ + public parent: string; + + /** ListLakesRequest pageSize. */ + public pageSize: number; + + /** ListLakesRequest pageToken. */ + public pageToken: string; + + /** ListLakesRequest filter. */ + public filter: string; + + /** ListLakesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListLakesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Verifies a ListLakesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @param message ListLakesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakesResponse. */ + interface IListLakesResponse { + + /** ListLakesResponse lakes */ + lakes?: (google.cloud.dataplex.v1.ILake[]|null); + + /** ListLakesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListLakesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListLakesResponse. */ + class ListLakesResponse implements IListLakesResponse { + + /** + * Constructs a new ListLakesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); + + /** ListLakesResponse lakes. */ + public lakes: google.cloud.dataplex.v1.ILake[]; + + /** ListLakesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListLakesResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Verifies a ListLakesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @param message ListLakesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakeActionsRequest. */ + interface IListLakeActionsRequest { + + /** ListLakeActionsRequest parent */ + parent?: (string|null); + + /** ListLakeActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListLakeActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLakeActionsRequest. */ + class ListLakeActionsRequest implements IListLakeActionsRequest { + + /** + * Constructs a new ListLakeActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); + + /** ListLakeActionsRequest parent. */ + public parent: string; + + /** ListLakeActionsRequest pageSize. */ + public pageSize: number; + + /** ListLakeActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakeActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Verifies a ListLakeActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakeActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @param message ListLakeActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakeActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListActionsResponse. */ + interface IListActionsResponse { + + /** ListActionsResponse actions */ + actions?: (google.cloud.dataplex.v1.IAction[]|null); + + /** ListActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListActionsResponse. */ + class ListActionsResponse implements IListActionsResponse { + + /** + * Constructs a new ListActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); + + /** ListActionsResponse actions. */ + public actions: google.cloud.dataplex.v1.IAction[]; + + /** ListActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Verifies a ListActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @param message ListActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetLakeRequest. */ + interface IGetLakeRequest { + + /** GetLakeRequest name */ + name?: (string|null); + } + + /** Represents a GetLakeRequest. */ + class GetLakeRequest implements IGetLakeRequest { + + /** + * Constructs a new GetLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); + + /** GetLakeRequest name. */ + public name: string; + + /** + * Creates a new GetLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Verifies a GetLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @param message GetLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateZoneRequest. */ + interface ICreateZoneRequest { + + /** CreateZoneRequest parent */ + parent?: (string|null); + + /** CreateZoneRequest zoneId */ + zoneId?: (string|null); + + /** CreateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateZoneRequest. */ + class CreateZoneRequest implements ICreateZoneRequest { + + /** + * Constructs a new CreateZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); + + /** CreateZoneRequest parent. */ + public parent: string; + + /** CreateZoneRequest zoneId. */ + public zoneId: string; + + /** CreateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Verifies a CreateZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @param message CreateZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateZoneRequest. */ + interface IUpdateZoneRequest { + + /** UpdateZoneRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateZoneRequest. */ + class UpdateZoneRequest implements IUpdateZoneRequest { + + /** + * Constructs a new UpdateZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); + + /** UpdateZoneRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Verifies an UpdateZoneRequest message. + * @param message Plain 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 UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @param message UpdateZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteZoneRequest. */ + interface IDeleteZoneRequest { + + /** DeleteZoneRequest name */ + name?: (string|null); + } + + /** Represents a DeleteZoneRequest. */ + class DeleteZoneRequest implements IDeleteZoneRequest { + + /** + * Constructs a new DeleteZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); + + /** DeleteZoneRequest name. */ + public name: string; + + /** + * Creates a new DeleteZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Verifies a DeleteZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @param message DeleteZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListZonesRequest. */ + interface IListZonesRequest { + + /** ListZonesRequest parent */ + parent?: (string|null); + + /** ListZonesRequest pageSize */ + pageSize?: (number|null); + + /** ListZonesRequest pageToken */ + pageToken?: (string|null); + + /** ListZonesRequest filter */ + filter?: (string|null); + + /** ListZonesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListZonesRequest. */ + class ListZonesRequest implements IListZonesRequest { + + /** + * Constructs a new ListZonesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); + + /** ListZonesRequest parent. */ + public parent: string; + + /** ListZonesRequest pageSize. */ + public pageSize: number; + + /** ListZonesRequest pageToken. */ + public pageToken: string; + + /** ListZonesRequest filter. */ + public filter: string; + + /** ListZonesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListZonesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZonesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Verifies a ListZonesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZonesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * @param message ListZonesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZonesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListZonesResponse. */ + interface IListZonesResponse { + + /** ListZonesResponse zones */ + zones?: (google.cloud.dataplex.v1.IZone[]|null); + + /** ListZonesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListZonesResponse. */ + class ListZonesResponse implements IListZonesResponse { + + /** + * Constructs a new ListZonesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); + + /** ListZonesResponse zones. */ + public zones: google.cloud.dataplex.v1.IZone[]; + + /** ListZonesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListZonesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZonesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Verifies a ListZonesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZonesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @param message ListZonesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZonesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListZoneActionsRequest. */ + interface IListZoneActionsRequest { + + /** ListZoneActionsRequest parent */ + parent?: (string|null); + + /** ListZoneActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListZoneActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListZoneActionsRequest. */ + class ListZoneActionsRequest implements IListZoneActionsRequest { + + /** + * Constructs a new ListZoneActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); + + /** ListZoneActionsRequest parent. */ + public parent: string; + + /** ListZoneActionsRequest pageSize. */ + public pageSize: number; + + /** ListZoneActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListZoneActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZoneActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Verifies a ListZoneActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZoneActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * @param message ListZoneActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZoneActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetZoneRequest. */ + interface IGetZoneRequest { + + /** GetZoneRequest name */ + name?: (string|null); + } + + /** Represents a GetZoneRequest. */ + class GetZoneRequest implements IGetZoneRequest { + + /** + * Constructs a new GetZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); + + /** GetZoneRequest name. */ + public name: string; + + /** + * Creates a new GetZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Verifies a GetZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @param message GetZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateAssetRequest. */ + interface ICreateAssetRequest { + + /** CreateAssetRequest parent */ + parent?: (string|null); + + /** CreateAssetRequest assetId */ + assetId?: (string|null); + + /** CreateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateAssetRequest. */ + class CreateAssetRequest implements ICreateAssetRequest { + + /** + * Constructs a new CreateAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); + + /** CreateAssetRequest parent. */ + public parent: string; + + /** CreateAssetRequest assetId. */ + public assetId: string; + + /** CreateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Verifies a CreateAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @param message CreateAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateAssetRequest. */ + interface IUpdateAssetRequest { + + /** UpdateAssetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateAssetRequest. */ + class UpdateAssetRequest implements IUpdateAssetRequest { + + /** + * Constructs a new UpdateAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); + + /** UpdateAssetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Verifies an UpdateAssetRequest message. + * @param message Plain 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 UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @param message UpdateAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteAssetRequest. */ + interface IDeleteAssetRequest { + + /** DeleteAssetRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAssetRequest. */ + class DeleteAssetRequest implements IDeleteAssetRequest { + + /** + * Constructs a new DeleteAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); + + /** DeleteAssetRequest name. */ + public name: string; + + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Verifies a DeleteAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @param message DeleteAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { + + /** ListAssetsRequest parent */ + parent?: (string|null); + + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); + + /** ListAssetsRequest filter */ + filter?: (string|null); + + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { + + /** + * Constructs a new ListAssetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); + + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Verifies a ListAssetsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { + + /** ListAssetsResponse assets */ + assets?: (google.cloud.dataplex.v1.IAsset[]|null); + + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { + + /** + * Constructs a new ListAssetsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); + + /** ListAssetsResponse assets. */ + public assets: google.cloud.dataplex.v1.IAsset[]; + + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Verifies a ListAssetsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAssetActionsRequest. */ + interface IListAssetActionsRequest { + + /** ListAssetActionsRequest parent */ + parent?: (string|null); + + /** ListAssetActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAssetActionsRequest. */ + class ListAssetActionsRequest implements IListAssetActionsRequest { + + /** + * Constructs a new ListAssetActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); + + /** ListAssetActionsRequest parent. */ + public parent: string; + + /** ListAssetActionsRequest pageSize. */ + public pageSize: number; + + /** ListAssetActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Verifies a ListAssetActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @param message ListAssetActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetAssetRequest. */ + interface IGetAssetRequest { + + /** GetAssetRequest name */ + name?: (string|null); + } + + /** Represents a GetAssetRequest. */ + class GetAssetRequest implements IGetAssetRequest { + + /** + * Constructs a new GetAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); + + /** GetAssetRequest name. */ + public name: string; + + /** + * Creates a new GetAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Verifies a GetAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @param message GetAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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.dataplex.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.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTaskRequest. */ + interface ICreateTaskRequest { + + /** CreateTaskRequest parent */ + parent?: (string|null); + + /** CreateTaskRequest taskId */ + taskId?: (string|null); + + /** CreateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); + + /** CreateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateTaskRequest. */ + class CreateTaskRequest implements ICreateTaskRequest { + + /** + * Constructs a new CreateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); + + /** CreateTaskRequest parent. */ + public parent: string; + + /** CreateTaskRequest taskId. */ + public taskId: string; + + /** CreateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); + + /** CreateTaskRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Verifies a CreateTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @param message CreateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateTaskRequest. */ + interface IUpdateTaskRequest { + + /** UpdateTaskRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); + + /** UpdateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateTaskRequest. */ + class UpdateTaskRequest implements IUpdateTaskRequest { + + /** + * Constructs a new UpdateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); + + /** UpdateTaskRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); + + /** UpdateTaskRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Verifies an UpdateTaskRequest message. + * @param message Plain 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 UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @param message UpdateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteTaskRequest. */ + interface IDeleteTaskRequest { + + /** DeleteTaskRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTaskRequest. */ + class DeleteTaskRequest implements IDeleteTaskRequest { + + /** + * Constructs a new DeleteTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); + + /** DeleteTaskRequest name. */ + public name: string; + + /** + * Creates a new DeleteTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Verifies a DeleteTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @param message DeleteTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTasksRequest. */ + interface IListTasksRequest { + + /** ListTasksRequest parent */ + parent?: (string|null); + + /** ListTasksRequest pageSize */ + pageSize?: (number|null); + + /** ListTasksRequest pageToken */ + pageToken?: (string|null); + + /** ListTasksRequest filter */ + filter?: (string|null); + + /** ListTasksRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListTasksRequest. */ + class ListTasksRequest implements IListTasksRequest { + + /** + * Constructs a new ListTasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); + + /** ListTasksRequest parent. */ + public parent: string; + + /** ListTasksRequest pageSize. */ + public pageSize: number; + + /** ListTasksRequest pageToken. */ + public pageToken: string; + + /** ListTasksRequest filter. */ + public filter: string; + + /** ListTasksRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Verifies a ListTasksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @param message ListTasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTasksResponse. */ + interface IListTasksResponse { + + /** ListTasksResponse tasks */ + tasks?: (google.cloud.dataplex.v1.ITask[]|null); + + /** ListTasksResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTasksResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListTasksResponse. */ + class ListTasksResponse implements IListTasksResponse { + + /** + * Constructs a new ListTasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); + + /** ListTasksResponse tasks. */ + public tasks: google.cloud.dataplex.v1.ITask[]; + + /** ListTasksResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTasksResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListTasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Verifies a ListTasksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @param message ListTasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetTaskRequest. */ + interface IGetTaskRequest { + + /** GetTaskRequest name */ + name?: (string|null); + } + + /** Represents a GetTaskRequest. */ + class GetTaskRequest implements IGetTaskRequest { + + /** + * Constructs a new GetTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); + + /** GetTaskRequest name. */ + public name: string; + + /** + * Creates a new GetTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Verifies a GetTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @param message GetTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetJobRequest. */ + interface IGetJobRequest { + + /** GetJobRequest name */ + name?: (string|null); + } + + /** Represents a GetJobRequest. */ + class GetJobRequest implements IGetJobRequest { + + /** + * Constructs a new GetJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); + + /** GetJobRequest name. */ + public name: string; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Verifies a GetJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @param message GetJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsRequest. */ + interface IListJobsRequest { + + /** ListJobsRequest parent */ + parent?: (string|null); + + /** ListJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListJobsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListJobsRequest. */ + class ListJobsRequest implements IListJobsRequest { + + /** + * Constructs a new ListJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); + + /** ListJobsRequest parent. */ + public parent: string; + + /** ListJobsRequest pageSize. */ + public pageSize: number; + + /** ListJobsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Verifies a ListJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @param message ListJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsResponse. */ + interface IListJobsResponse { + + /** ListJobsResponse jobs */ + jobs?: (google.cloud.dataplex.v1.IJob[]|null); + + /** ListJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListJobsResponse. */ + class ListJobsResponse implements IListJobsResponse { + + /** + * Constructs a new ListJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); + + /** ListJobsResponse jobs. */ + public jobs: google.cloud.dataplex.v1.IJob[]; + + /** ListJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Verifies a ListJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @param message ListJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelJobRequest. */ + interface ICancelJobRequest { + + /** CancelJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelJobRequest. */ + class CancelJobRequest implements ICancelJobRequest { + + /** + * Constructs a new CancelJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); + + /** CancelJobRequest name. */ + public name: string; + + /** + * Creates a new CancelJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Verifies a CancelJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @param message CancelJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Task. */ + interface ITask { + + /** Task name */ + name?: (string|null); + + /** Task uid */ + uid?: (string|null); + + /** Task createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description */ + description?: (string|null); + + /** Task displayName */ + displayName?: (string|null); + + /** Task state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Task labels */ + labels?: ({ [k: string]: string }|null); + + /** Task triggerSpec */ + triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec */ + executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task spark */ + spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + } + + /** Represents a Task. */ + class Task implements ITask { + + /** + * Constructs a new Task. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ITask); + + /** Task name. */ + public name: string; + + /** Task uid. */ + public uid: string; + + /** Task createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description. */ + public description: string; + + /** Task displayName. */ + public displayName: string; + + /** Task state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Task labels. */ + public labels: { [k: string]: string }; + + /** Task triggerSpec. */ + public triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec. */ + public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task spark. */ + public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + + /** Task config. */ + public config?: "spark"; + + /** + * Creates a new Task instance using the specified properties. + * @param [properties] Properties to set + * @returns Task instance + */ + public static create(properties?: google.cloud.dataplex.v1.ITask): google.cloud.dataplex.v1.Task; + + /** + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Task message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task; + + /** + * Verifies a Task message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Task + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @param message Task + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Task to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Task { + + /** Properties of an InfrastructureSpec. */ + interface IInfrastructureSpec { + + /** InfrastructureSpec batch */ + batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage */ + containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork */ + vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + } + + /** Represents an InfrastructureSpec. */ + class InfrastructureSpec implements IInfrastructureSpec { + + /** + * Constructs a new InfrastructureSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec); + + /** InfrastructureSpec batch. */ + public batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage. */ + public containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork. */ + public vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + + /** InfrastructureSpec resources. */ + public resources?: "batch"; + + /** InfrastructureSpec runtime. */ + public runtime?: "containerImage"; + + /** InfrastructureSpec network. */ + public network?: "vpcNetwork"; + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns InfrastructureSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Verifies an InfrastructureSpec message. + * @param message Plain 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 InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfrastructureSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @param message InfrastructureSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfrastructureSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InfrastructureSpec { + + /** Properties of a BatchComputeResources. */ + interface IBatchComputeResources { + + /** BatchComputeResources executorsCount */ + executorsCount?: (number|null); + + /** BatchComputeResources maxExecutorsCount */ + maxExecutorsCount?: (number|null); + } + + /** Represents a BatchComputeResources. */ + class BatchComputeResources implements IBatchComputeResources { + + /** + * Constructs a new BatchComputeResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources); + + /** BatchComputeResources executorsCount. */ + public executorsCount: number; + + /** BatchComputeResources maxExecutorsCount. */ + public maxExecutorsCount: number; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchComputeResources instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Verifies a BatchComputeResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchComputeResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @param message BatchComputeResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchComputeResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContainerImageRuntime. */ + interface IContainerImageRuntime { + + /** ContainerImageRuntime javaJars */ + javaJars?: (string[]|null); + + /** ContainerImageRuntime pythonPackages */ + pythonPackages?: (string[]|null); + + /** ContainerImageRuntime properties */ + properties?: ({ [k: string]: string }|null); + } + + /** Represents a ContainerImageRuntime. */ + class ContainerImageRuntime implements IContainerImageRuntime { + + /** + * Constructs a new ContainerImageRuntime. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime); + + /** ContainerImageRuntime javaJars. */ + public javaJars: string[]; + + /** ContainerImageRuntime pythonPackages. */ + public pythonPackages: string[]; + + /** ContainerImageRuntime properties. */ + public properties: { [k: string]: string }; + + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @param [properties] Properties to set + * @returns ContainerImageRuntime instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Verifies a ContainerImageRuntime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContainerImageRuntime + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @param message ContainerImageRuntime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContainerImageRuntime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a VpcNetwork. */ + interface IVpcNetwork { + + /** VpcNetwork network */ + network?: (string|null); + + /** VpcNetwork subNetwork */ + subNetwork?: (string|null); + + /** VpcNetwork networkTags */ + networkTags?: (string[]|null); + } + + /** Represents a VpcNetwork. */ + class VpcNetwork implements IVpcNetwork { + + /** + * Constructs a new VpcNetwork. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork); + + /** VpcNetwork network. */ + public network?: (string|null); + + /** VpcNetwork subNetwork. */ + public subNetwork?: (string|null); + + /** VpcNetwork networkTags. */ + public networkTags: string[]; + + /** VpcNetwork networkName. */ + public networkName?: ("network"|"subNetwork"); + + /** + * Creates a new VpcNetwork instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcNetwork instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Verifies a VpcNetwork message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcNetwork + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @param message VpcNetwork + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcNetwork to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TriggerSpec. */ + interface ITriggerSpec { + + /** TriggerSpec type */ + type?: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type|null); + + /** TriggerSpec startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TriggerSpec disabled */ + disabled?: (boolean|null); + + /** TriggerSpec maxRetries */ + maxRetries?: (number|null); + + /** TriggerSpec schedule */ + schedule?: (string|null); + } + + /** Represents a TriggerSpec. */ + class TriggerSpec implements ITriggerSpec { + + /** + * Constructs a new TriggerSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec); + + /** TriggerSpec type. */ + public type: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type); + + /** TriggerSpec startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TriggerSpec disabled. */ + public disabled: boolean; + + /** TriggerSpec maxRetries. */ + public maxRetries: number; + + /** TriggerSpec schedule. */ + public schedule?: (string|null); + + /** TriggerSpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new TriggerSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Verifies a TriggerSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @param message TriggerSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.TriggerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TriggerSpec { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ON_DEMAND = 1, + RECURRING = 2 + } + } + + /** Properties of an ExecutionSpec. */ + interface IExecutionSpec { + + /** ExecutionSpec args */ + args?: ({ [k: string]: string }|null); + + /** ExecutionSpec serviceAccount */ + serviceAccount?: (string|null); + + /** ExecutionSpec maxJobExecutionLifetime */ + maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + } + + /** Represents an ExecutionSpec. */ + class ExecutionSpec implements IExecutionSpec { + + /** + * Constructs a new ExecutionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec); + + /** ExecutionSpec args. */ + public args: { [k: string]: string }; + + /** ExecutionSpec serviceAccount. */ + public serviceAccount: string; + + /** ExecutionSpec maxJobExecutionLifetime. */ + public maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Verifies an ExecutionSpec message. + * @param message Plain 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 ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @param message ExecutionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SparkTaskConfig. */ + interface ISparkTaskConfig { + + /** SparkTaskConfig mainJarFileUri */ + mainJarFileUri?: (string|null); + + /** SparkTaskConfig mainClass */ + mainClass?: (string|null); + + /** SparkTaskConfig pythonScriptFile */ + pythonScriptFile?: (string|null); + + /** SparkTaskConfig sqlScriptFile */ + sqlScriptFile?: (string|null); + + /** SparkTaskConfig sqlScript */ + sqlScript?: (string|null); + + /** SparkTaskConfig fileUris */ + fileUris?: (string[]|null); + + /** SparkTaskConfig archiveUris */ + archiveUris?: (string[]|null); + + /** SparkTaskConfig infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + } + + /** Represents a SparkTaskConfig. */ + class SparkTaskConfig implements ISparkTaskConfig { + + /** + * Constructs a new SparkTaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig); + + /** SparkTaskConfig mainJarFileUri. */ + public mainJarFileUri?: (string|null); + + /** SparkTaskConfig mainClass. */ + public mainClass?: (string|null); + + /** SparkTaskConfig pythonScriptFile. */ + public pythonScriptFile?: (string|null); + + /** SparkTaskConfig sqlScriptFile. */ + public sqlScriptFile?: (string|null); + + /** SparkTaskConfig sqlScript. */ + public sqlScript?: (string|null); + + /** SparkTaskConfig fileUris. */ + public fileUris: string[]; + + /** SparkTaskConfig archiveUris. */ + public archiveUris: string[]; + + /** SparkTaskConfig infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + + /** SparkTaskConfig driver. */ + public driver?: ("mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"); + + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SparkTaskConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Verifies a SparkTaskConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SparkTaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @param message SparkTaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.SparkTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SparkTaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Job. */ + interface IJob { + + /** Job name */ + name?: (string|null); + + /** Job uid */ + uid?: (string|null); + + /** Job startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Job state */ + state?: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State|null); + + /** Job retryCount */ + retryCount?: (number|null); + + /** Job service */ + service?: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service|null); + + /** Job serviceJob */ + serviceJob?: (string|null); + + /** Job message */ + message?: (string|null); + } + + /** Represents a Job. */ + class Job implements IJob { + + /** + * Constructs a new Job. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJob); + + /** Job name. */ + public name: string; + + /** Job uid. */ + public uid: string; + + /** Job startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Job state. */ + public state: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State); + + /** Job retryCount. */ + public retryCount: number; + + /** Job service. */ + public service: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service); + + /** Job serviceJob. */ + public serviceJob: string; + + /** Job message. */ + public message: string; + + /** + * Creates a new Job instance using the specified properties. + * @param [properties] Properties to set + * @returns Job instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJob): google.cloud.dataplex.v1.Job; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Job message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Job; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Job; + + /** + * Verifies a Job message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Job + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Job; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @param message Job + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Job to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Job { + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4, + FAILED = 5, + ABORTED = 6 + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 }; + } + + 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 }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js new file mode 100644 index 00000000000..6be7684d7b4 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -0,0 +1,40911 @@ +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_dataplex_protos || ($protobuf.roots._google_cloud_dataplex_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.dataplex = (function() { + + /** + * Namespace dataplex. + * @memberof google.cloud + * @namespace + */ + var dataplex = {}; + + dataplex.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.dataplex + * @namespace + */ + var v1 = {}; + + v1.DiscoveryEvent = (function() { + + /** + * Properties of a DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IDiscoveryEvent + * @property {string|null} [message] DiscoveryEvent message + * @property {string|null} [lakeId] DiscoveryEvent lakeId + * @property {string|null} [zoneId] DiscoveryEvent zoneId + * @property {string|null} [assetId] DiscoveryEvent assetId + * @property {string|null} [dataLocation] DiscoveryEvent dataLocation + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + */ + + /** + * Constructs a new DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DiscoveryEvent. + * @implements IDiscoveryEvent + * @constructor + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + */ + function DiscoveryEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.message = ""; + + /** + * DiscoveryEvent lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.lakeId = ""; + + /** + * DiscoveryEvent zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.zoneId = ""; + + /** + * DiscoveryEvent assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.assetId = ""; + + /** + * DiscoveryEvent dataLocation. + * @member {string} dataLocation + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.dataLocation = ""; + + /** + * DiscoveryEvent type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.type = 0; + + /** + * DiscoveryEvent config. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.config = null; + + /** + * DiscoveryEvent entity. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.entity = null; + + /** + * DiscoveryEvent partition. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.partition = null; + + /** + * DiscoveryEvent action. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.action = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryEvent details. + * @member {"config"|"entity"|"partition"|"action"|undefined} details + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + Object.defineProperty(DiscoveryEvent.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + */ + DiscoveryEvent.create = function create(properties) { + return new DiscoveryEvent(properties); + }; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); + if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.lakeId = reader.string(); + break; + case 3: + message.zoneId = reader.string(); + break; + case 4: + message.assetId = reader.string(); + break; + case 5: + message.dataLocation = reader.string(); + break; + case 10: + message.type = reader.int32(); + break; + case 20: + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + break; + case 21: + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + break; + case 22: + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + break; + case 23: + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + if (!$util.isString(message.dataLocation)) + return "dataLocation: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.entity != null && message.hasOwnProperty("entity")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); + if (error) + return "entity." + error; + } + } + if (message.partition != null && message.hasOwnProperty("partition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); + if (error) + return "partition." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); + if (error) + return "action." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + */ + DiscoveryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.dataLocation != null) + message.dataLocation = String(object.dataLocation); + switch (object.type) { + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONFIG": + case 1: + message.type = 1; + break; + case "ENTITY_CREATED": + case 2: + message.type = 2; + break; + case "ENTITY_UPDATED": + case 3: + message.type = 3; + break; + case "ENTITY_DELETED": + case 4: + message.type = 4; + break; + case "PARTITION_CREATED": + case 5: + message.type = 5; + break; + case "PARTITION_UPDATED": + case 6: + message.type = 6; + break; + case "PARTITION_DELETED": + case 7: + message.type = 7; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); + } + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); + } + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); + } + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.lakeId = ""; + object.zoneId = ""; + object.assetId = ""; + object.dataLocation = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + object.dataLocation = message.dataLocation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); + if (options.oneofs) + object.details = "config"; + } + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); + if (options.oneofs) + object.details = "entity"; + } + if (message.partition != null && message.hasOwnProperty("partition")) { + object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); + if (options.oneofs) + object.details = "partition"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); + if (options.oneofs) + object.details = "action"; + } + return object; + }; + + /** + * Converts this DiscoveryEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + * @returns {Object.} JSON object + */ + DiscoveryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} CONFIG=1 CONFIG value + * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value + * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value + * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value + * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value + * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value + * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value + */ + DiscoveryEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIG"] = 1; + values[valuesById[2] = "ENTITY_CREATED"] = 2; + values[valuesById[3] = "ENTITY_UPDATED"] = 3; + values[valuesById[4] = "ENTITY_DELETED"] = 4; + values[valuesById[5] = "PARTITION_CREATED"] = 5; + values[valuesById[6] = "PARTITION_UPDATED"] = 6; + values[valuesById[7] = "PARTITION_DELETED"] = 7; + return values; + })(); + + /** + * EntityType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType + * @enum {number} + * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + DiscoveryEvent.EntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + DiscoveryEvent.ConfigDetails = (function() { + + /** + * Properties of a ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IConfigDetails + * @property {Object.|null} [parameters] ConfigDetails parameters + */ + + /** + * Constructs a new ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a ConfigDetails. + * @implements IConfigDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + */ + function ConfigDetails(properties) { + this.parameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigDetails parameters. + * @member {Object.} parameters + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + */ + ConfigDetails.prototype.parameters = $util.emptyObject; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + */ + ConfigDetails.create = function create(properties) { + return new ConfigDetails(properties); + }; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.parameters === $util.emptyObject) + message.parameters = {}; + 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.parameters[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.parameters[key[i]])) + return "parameters: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + */ + ConfigDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) + message.parameters[keys[i]] = String(object.parameters[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = message.parameters[keys2[j]]; + } + return object; + }; + + /** + * Converts this ConfigDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + * @returns {Object.} JSON object + */ + ConfigDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfigDetails; + })(); + + DiscoveryEvent.EntityDetails = (function() { + + /** + * Properties of an EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IEntityDetails + * @property {string|null} [entity] EntityDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type + */ + + /** + * Constructs a new EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an EntityDetails. + * @implements IEntityDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + */ + function EntityDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.entity = ""; + + /** + * EntityDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.type = 0; + + /** + * Creates a new EntityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance + */ + EntityDetails.create = function create(properties) { + return new EntityDetails(properties); + }; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.entity = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + */ + EntityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this EntityDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + * @returns {Object.} JSON object + */ + EntityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EntityDetails; + })(); + + DiscoveryEvent.PartitionDetails = (function() { + + /** + * Properties of a PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IPartitionDetails + * @property {string|null} [partition] PartitionDetails partition + * @property {string|null} [entity] PartitionDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type + */ + + /** + * Constructs a new PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a PartitionDetails. + * @implements IPartitionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + */ + function PartitionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionDetails partition. + * @member {string} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.partition = ""; + + /** + * PartitionDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.entity = ""; + + /** + * PartitionDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.type = 0; + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance + */ + PartitionDetails.create = function create(properties) { + return new PartitionDetails(properties); + }; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.partition = reader.string(); + break; + case 2: + message.entity = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) + if (!$util.isString(message.partition)) + return "partition: string expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + */ + PartitionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + if (object.partition != null) + message.partition = String(object.partition); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partition = ""; + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = message.partition; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this PartitionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + * @returns {Object.} JSON object + */ + PartitionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartitionDetails; + })(); + + DiscoveryEvent.ActionDetails = (function() { + + /** + * Properties of an ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IActionDetails + * @property {string|null} [type] ActionDetails type + */ + + /** + * Constructs a new ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an ActionDetails. + * @implements IActionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + */ + function ActionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActionDetails type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.type = ""; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + */ + ActionDetails.create = function create(properties) { + return new ActionDetails(properties); + }; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.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); + return writer; + }; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionDetails.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"; + return null; + }; + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + */ + ActionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this ActionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + * @returns {Object.} JSON object + */ + ActionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ActionDetails; + })(); + + return DiscoveryEvent; + })(); + + v1.JobEvent = (function() { + + /** + * Properties of a JobEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IJobEvent + * @property {string|null} [message] JobEvent message + * @property {string|null} [jobId] JobEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime + * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state + * @property {number|null} [retries] JobEvent retries + * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type + * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service + * @property {string|null} [serviceJob] JobEvent serviceJob + */ + + /** + * Constructs a new JobEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a JobEvent. + * @implements IJobEvent + * @constructor + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + */ + function JobEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.message = ""; + + /** + * JobEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.jobId = ""; + + /** + * JobEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.startTime = null; + + /** + * JobEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.endTime = null; + + /** + * JobEvent state. + * @member {google.cloud.dataplex.v1.JobEvent.State} state + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.state = 0; + + /** + * JobEvent retries. + * @member {number} retries + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.retries = 0; + + /** + * JobEvent type. + * @member {google.cloud.dataplex.v1.JobEvent.Type} type + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.type = 0; + + /** + * JobEvent service. + * @member {google.cloud.dataplex.v1.JobEvent.Service} service + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.service = 0; + + /** + * JobEvent serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.serviceJob = ""; + + /** + * Creates a new JobEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + */ + JobEvent.create = function create(properties) { + return new JobEvent(properties); + }; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + return writer; + }; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.jobId = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 6: + message.retries = reader.int32(); + break; + case 7: + message.type = reader.int32(); + break; + case 8: + message.service = reader.int32(); + break; + case 9: + message.serviceJob = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.retries != null && message.hasOwnProperty("retries")) + if (!$util.isInteger(message.retries)) + return "retries: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + return null; + }; + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + */ + JobEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.JobEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "ABORTED": + case 4: + message.state = 4; + break; + } + if (object.retries != null) + message.retries = object.retries | 0; + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SPARK": + case 1: + message.type = 1; + break; + case "NOTEBOOK": + case 2: + message.type = 2; + break; + } + switch (object.service) { + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + return message; + }; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retries = 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; + if (message.retries != null && message.hasOwnProperty("retries")) + object.retries = message.retries; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + return object; + }; + + /** + * Converts this JobEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + * @returns {Object.} JSON object + */ + JobEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.JobEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SPARK=1 SPARK value + * @property {number} NOTEBOOK=2 NOTEBOOK value + */ + JobEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK"] = 1; + values[valuesById[2] = "NOTEBOOK"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.JobEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} ABORTED=4 ABORTED value + */ + JobEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "ABORTED"] = 4; + return values; + })(); + + /** + * Service enum. + * @name google.cloud.dataplex.v1.JobEvent.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + JobEvent.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + return JobEvent; + })(); + + v1.SessionEvent = (function() { + + /** + * Properties of a SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @interface ISessionEvent + * @property {string|null} [message] SessionEvent message + * @property {string|null} [userId] SessionEvent userId + * @property {string|null} [sessionId] SessionEvent sessionId + * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type + * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query + */ + + /** + * Constructs a new SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SessionEvent. + * @implements ISessionEvent + * @constructor + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + */ + function SessionEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.message = ""; + + /** + * SessionEvent userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.userId = ""; + + /** + * SessionEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.sessionId = ""; + + /** + * SessionEvent type. + * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.type = 0; + + /** + * SessionEvent query. + * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.query = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionEvent detail. + * @member {"query"|undefined} detail + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + Object.defineProperty(SessionEvent.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance + */ + SessionEvent.create = function create(properties) { + return new SessionEvent(properties); + }; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.userId = reader.string(); + break; + case 3: + message.sessionId = reader.string(); + break; + case 4: + message.type = reader.int32(); + break; + case 5: + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.query != null && message.hasOwnProperty("query")) { + properties.detail = 1; + { + var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); + if (error) + return "query." + error; + } + } + return null; + }; + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + */ + SessionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.userId != null) + message.userId = String(object.userId); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.type) { + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "START": + case 1: + message.type = 1; + break; + case "STOP": + case 2: + message.type = 2; + break; + case "QUERY": + case 3: + message.type = 3; + break; + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + } + return message; + }; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.userId = ""; + object.sessionId = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); + if (options.oneofs) + object.detail = "query"; + } + return object; + }; + + /** + * Converts this SessionEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + * @returns {Object.} JSON object + */ + SessionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.SessionEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} START=1 START value + * @property {number} STOP=2 STOP value + * @property {number} QUERY=3 QUERY value + */ + SessionEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START"] = 1; + values[valuesById[2] = "STOP"] = 2; + values[valuesById[3] = "QUERY"] = 3; + return values; + })(); + + SessionEvent.QueryDetail = (function() { + + /** + * Properties of a QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @interface IQueryDetail + * @property {string|null} [queryId] QueryDetail queryId + * @property {string|null} [queryText] QueryDetail queryText + * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine + * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration + * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes + * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes + */ + + /** + * Constructs a new QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @classdesc Represents a QueryDetail. + * @implements IQueryDetail + * @constructor + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + */ + function QueryDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDetail queryId. + * @member {string} queryId + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryId = ""; + + /** + * QueryDetail queryText. + * @member {string} queryText + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryText = ""; + + /** + * QueryDetail engine. + * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.engine = 0; + + /** + * QueryDetail duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.duration = null; + + /** + * QueryDetail resultSizeBytes. + * @member {number|Long} resultSizeBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryDetail dataProcessedBytes. + * @member {number|Long} dataProcessedBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryDetail instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance + */ + QueryDetail.create = function create(properties) { + return new QueryDetail(properties); + }; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); + if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); + return writer; + }; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.queryId = reader.string(); + break; + case 2: + message.queryText = reader.string(); + break; + case 3: + message.engine = reader.int32(); + break; + case 4: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + message.resultSizeBytes = reader.int64(); + break; + case 6: + message.dataProcessedBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDetail message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.queryText != null && message.hasOwnProperty("queryText")) + if (!$util.isString(message.queryText)) + return "queryText: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) + return "resultSizeBytes: integer|Long expected"; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) + return "dataProcessedBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + */ + QueryDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.queryText != null) + message.queryText = String(object.queryText); + switch (object.engine) { + case "ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK_SQL": + case 1: + message.engine = 1; + break; + case "BIGQUERY": + case 2: + message.engine = 2; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.resultSizeBytes != null) + if ($util.Long) + (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; + else if (typeof object.resultSizeBytes === "string") + message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); + else if (typeof object.resultSizeBytes === "number") + message.resultSizeBytes = object.resultSizeBytes; + else if (typeof object.resultSizeBytes === "object") + message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); + if (object.dataProcessedBytes != null) + if ($util.Long) + (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; + else if (typeof object.dataProcessedBytes === "string") + message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); + else if (typeof object.dataProcessedBytes === "number") + message.dataProcessedBytes = object.dataProcessedBytes; + else if (typeof object.dataProcessedBytes === "object") + message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.queryId = ""; + object.queryText = ""; + object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; + object.duration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resultSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataProcessedBytes = options.longs === String ? "0" : 0; + } + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.queryText != null && message.hasOwnProperty("queryText")) + object.queryText = message.queryText; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (typeof message.resultSizeBytes === "number") + object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; + else + object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (typeof message.dataProcessedBytes === "number") + object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; + else + object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; + return object; + }; + + /** + * Converts this QueryDetail to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + * @returns {Object.} JSON object + */ + QueryDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Engine enum. + * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine + * @enum {number} + * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value + * @property {number} SPARK_SQL=1 SPARK_SQL value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + QueryDetail.Engine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_SQL"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + return QueryDetail; + })(); + + return SessionEvent; + })(); + + v1.MetadataService = (function() { + + /** + * Constructs a new MetadataService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a MetadataService + * @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 MetadataService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + + /** + * Creates new MetadataService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataService + * @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 {MetadataService} RPC service. Useful where requests and/or responses are streamed. + */ + MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { + return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "GetEntity" }); + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse + */ + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { + return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); + }, "name", { value: "ListEntities" }); + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetPartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition + */ + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { + return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "GetPartition" }); + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListPartitionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse + */ + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { + return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); + }, "name", { value: "ListPartitions" }); + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetadataService; + })(); + + v1.ListEntitiesRequest = (function() { + + /** + * Properties of a ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesRequest + * @property {string|null} [parent] ListEntitiesRequest parent + * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view + * @property {number|null} [pageSize] ListEntitiesRequest pageSize + * @property {string|null} [pageToken] ListEntitiesRequest pageToken + * @property {string|null} [filter] ListEntitiesRequest filter + */ + + /** + * Constructs a new ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesRequest. + * @implements IListEntitiesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + */ + function ListEntitiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.parent = ""; + + /** + * ListEntitiesRequest view. + * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.view = 0; + + /** + * ListEntitiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageSize = 0; + + /** + * ListEntitiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageToken = ""; + + /** + * ListEntitiesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.filter = ""; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance + */ + ListEntitiesRequest.create = function create(properties) { + return new ListEntitiesRequest(properties); + }; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + */ + ListEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.view) { + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "TABLES": + case 1: + message.view = 1; + break; + case "FILESETS": + case 2: + message.view = 2; + break; + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListEntitiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} TABLES=1 TABLES value + * @property {number} FILESETS=2 FILESETS value + */ + ListEntitiesRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLES"] = 1; + values[valuesById[2] = "FILESETS"] = 2; + return values; + })(); + + return ListEntitiesRequest; + })(); + + v1.ListEntitiesResponse = (function() { + + /** + * Properties of a ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesResponse + * @property {Array.|null} [entities] ListEntitiesResponse entities + * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken + */ + + /** + * Constructs a new ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesResponse. + * @implements IListEntitiesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + */ + function ListEntitiesResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.entities = $util.emptyArray; + + /** + * ListEntitiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance + */ + ListEntitiesResponse.create = function create(properties) { + return new ListEntitiesResponse(properties); + }; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dataplex.v1.Entity.encode(message.entities[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 ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + */ + ListEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListEntitiesResponse; + })(); + + v1.GetEntityRequest = (function() { + + /** + * Properties of a GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEntityRequest + * @property {string|null} [name] GetEntityRequest name + * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view + */ + + /** + * Constructs a new GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEntityRequest. + * @implements IGetEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + */ + function GetEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEntityRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.name = ""; + + /** + * GetEntityRequest view. + * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.view = 0; + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance + */ + GetEntityRequest.create = function create(properties) { + return new GetEntityRequest(properties); + }; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEntityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + */ + GetEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "SCHEMA": + case 2: + message.view = 2; + break; + case "FULL": + case 4: + message.view = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} FULL=4 FULL value + */ + GetEntityRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[4] = "FULL"] = 4; + return values; + })(); + + return GetEntityRequest; + })(); + + v1.ListPartitionsRequest = (function() { + + /** + * Properties of a ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsRequest + * @property {string|null} [parent] ListPartitionsRequest parent + * @property {number|null} [pageSize] ListPartitionsRequest pageSize + * @property {string|null} [pageToken] ListPartitionsRequest pageToken + * @property {string|null} [filter] ListPartitionsRequest filter + */ + + /** + * Constructs a new ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsRequest. + * @implements IListPartitionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + */ + function ListPartitionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.parent = ""; + + /** + * ListPartitionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageSize = 0; + + /** + * ListPartitionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageToken = ""; + + /** + * ListPartitionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.filter = ""; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance + */ + ListPartitionsRequest.create = function create(properties) { + return new ListPartitionsRequest(properties); + }; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + */ + ListPartitionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListPartitionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPartitionsRequest; + })(); + + v1.ListPartitionsResponse = (function() { + + /** + * Properties of a ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsResponse + * @property {Array.|null} [partitions] ListPartitionsResponse partitions + * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken + */ + + /** + * Constructs a new ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsResponse. + * @implements IListPartitionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + */ + function ListPartitionsResponse(properties) { + this.partitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsResponse partitions. + * @member {Array.} partitions + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.partitions = $util.emptyArray; + + /** + * ListPartitionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance + */ + ListPartitionsResponse.create = function create(properties) { + return new ListPartitionsResponse(properties); + }; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitions != null && message.partitions.length) + for (var i = 0; i < message.partitions.length; ++i) + $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[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 ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.partitions && message.partitions.length)) + message.partitions = []; + message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partitions != null && message.hasOwnProperty("partitions")) { + if (!Array.isArray(message.partitions)) + return "partitions: array expected"; + for (var i = 0; i < message.partitions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); + if (error) + return "partitions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + */ + ListPartitionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + if (object.partitions) { + if (!Array.isArray(object.partitions)) + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); + message.partitions = []; + for (var i = 0; i < object.partitions.length; ++i) { + if (typeof object.partitions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); + message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partitions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.partitions && message.partitions.length) { + object.partitions = []; + for (var j = 0; j < message.partitions.length; ++j) + object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPartitionsResponse; + })(); + + v1.GetPartitionRequest = (function() { + + /** + * Properties of a GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetPartitionRequest + * @property {string|null} [name] GetPartitionRequest name + */ + + /** + * Constructs a new GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetPartitionRequest. + * @implements IGetPartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + */ + function GetPartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPartitionRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + */ + GetPartitionRequest.prototype.name = ""; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance + */ + GetPartitionRequest.create = function create(properties) { + return new GetPartitionRequest(properties); + }; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encode = function encode(message, writer) { + 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 GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + 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 GetPartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPartitionRequest.verify = function verify(message) { + if (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 GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + */ + GetPartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPartitionRequest.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 GetPartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + * @returns {Object.} JSON object + */ + GetPartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPartitionRequest; + })(); + + v1.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.dataplex.v1 + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {string|null} [displayName] Entity displayName + * @property {string|null} [description] Entity description + * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime + * @property {string|null} [id] Entity id + * @property {string|null} [etag] Entity etag + * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type + * @property {string|null} [asset] Entity asset + * @property {string|null} [dataPath] Entity dataPath + * @property {string|null} [dataPathPattern] Entity dataPathPattern + * @property {string|null} [catalogEntry] Entity catalogEntry + * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system + * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format + * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility + * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.name = ""; + + /** + * Entity displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.displayName = ""; + + /** + * Entity description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.description = ""; + + /** + * Entity createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.createTime = null; + + /** + * Entity updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.updateTime = null; + + /** + * Entity id. + * @member {string} id + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.id = ""; + + /** + * Entity etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.etag = ""; + + /** + * Entity type. + * @member {google.cloud.dataplex.v1.Entity.Type} type + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.type = 0; + + /** + * Entity asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.asset = ""; + + /** + * Entity dataPath. + * @member {string} dataPath + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPath = ""; + + /** + * Entity dataPathPattern. + * @member {string} dataPathPattern + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPathPattern = ""; + + /** + * Entity catalogEntry. + * @member {string} catalogEntry + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.catalogEntry = ""; + + /** + * Entity system. + * @member {google.cloud.dataplex.v1.StorageSystem} system + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.system = 0; + + /** + * Entity format. + * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.format = null; + + /** + * Entity compatibility. + * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.compatibility = null; + + /** + * Entity schema. + * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.schema = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + 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.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.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); + if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); + if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); + if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); + if (message.system != null && Object.hasOwnProperty.call(message, "system")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.id = reader.string(); + break; + case 8: + message.etag = reader.string(); + break; + case 10: + message.type = reader.int32(); + break; + case 11: + message.asset = reader.string(); + break; + case 12: + message.dataPath = reader.string(); + break; + case 13: + message.dataPathPattern = reader.string(); + break; + case 14: + message.catalogEntry = reader.string(); + break; + case 15: + message.system = reader.int32(); + break; + case 16: + message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); + break; + case 19: + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); + break; + case 50: + message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + if (!$util.isString(message.dataPath)) + return "dataPath: string expected"; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + if (!$util.isString(message.dataPathPattern)) + return "dataPathPattern: string expected"; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + if (!$util.isString(message.catalogEntry)) + return "catalogEntry: string expected"; + if (message.system != null && message.hasOwnProperty("system")) + switch (message.system) { + default: + return "system: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.format != null && message.hasOwnProperty("format")) { + var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); + if (error) + return "format." + error; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); + if (error) + return "compatibility." + error; + } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.id != null) + message.id = String(object.id); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataPath != null) + message.dataPath = String(object.dataPath); + if (object.dataPathPattern != null) + message.dataPathPattern = String(object.dataPathPattern); + if (object.catalogEntry != null) + message.catalogEntry = String(object.catalogEntry); + switch (object.system) { + case "STORAGE_SYSTEM_UNSPECIFIED": + case 0: + message.system = 0; + break; + case "CLOUD_STORAGE": + case 1: + message.system = 1; + break; + case "BIGQUERY": + case 2: + message.system = 2; + break; + } + if (object.format != null) { + if (typeof object.format !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); + message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); + } + if (object.compatibility != null) { + if (typeof object.compatibility !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); + message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.id = ""; + object.etag = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.asset = ""; + object.dataPath = ""; + object.dataPathPattern = ""; + object.catalogEntry = ""; + object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; + object.format = null; + object.compatibility = null; + object.schema = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + object.dataPath = message.dataPath; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + object.dataPathPattern = message.dataPathPattern; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + object.catalogEntry = message.catalogEntry; + if (message.system != null && message.hasOwnProperty("system")) + object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; + if (message.format != null && message.hasOwnProperty("format")) + object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); + if (message.compatibility != null && message.hasOwnProperty("compatibility")) + object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Entity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + Entity.CompatibilityStatus = (function() { + + /** + * Properties of a CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @interface ICompatibilityStatus + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery + */ + + /** + * Constructs a new CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @classdesc Represents a CompatibilityStatus. + * @implements ICompatibilityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + */ + function CompatibilityStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompatibilityStatus hiveMetastore. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.hiveMetastore = null; + + /** + * CompatibilityStatus bigquery. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.bigquery = null; + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance + */ + CompatibilityStatus.create = function create(properties) { + return new CompatibilityStatus(properties); + }; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + case 2: + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompatibilityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompatibilityStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); + if (error) + return "hiveMetastore." + error; + } + if (message.bigquery != null && message.hasOwnProperty("bigquery")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); + if (error) + return "bigquery." + error; + } + return null; + }; + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + */ + CompatibilityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + if (object.hiveMetastore != null) { + if (typeof object.hiveMetastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); + } + if (object.bigquery != null) { + if (typeof object.bigquery !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); + } + return message; + }; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompatibilityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hiveMetastore = null; + object.bigquery = null; + } + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) + object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); + if (message.bigquery != null && message.hasOwnProperty("bigquery")) + object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); + return object; + }; + + /** + * Converts this CompatibilityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + * @returns {Object.} JSON object + */ + CompatibilityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompatibilityStatus.Compatibility = (function() { + + /** + * Properties of a Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @interface ICompatibility + * @property {boolean|null} [compatible] Compatibility compatible + * @property {string|null} [reason] Compatibility reason + */ + + /** + * Constructs a new Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @classdesc Represents a Compatibility. + * @implements ICompatibility + * @constructor + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + */ + function Compatibility(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Compatibility compatible. + * @member {boolean} compatible + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.compatible = false; + + /** + * Compatibility reason. + * @member {string} reason + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.reason = ""; + + /** + * Creates a new Compatibility instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance + */ + Compatibility.create = function create(properties) { + return new Compatibility(properties); + }; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); + return writer; + }; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.compatible = reader.bool(); + break; + case 2: + message.reason = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Compatibility message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Compatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compatible != null && message.hasOwnProperty("compatible")) + if (typeof message.compatible !== "boolean") + return "compatible: boolean expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + return null; + }; + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + */ + Compatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + if (object.compatible != null) + message.compatible = Boolean(object.compatible); + if (object.reason != null) + message.reason = String(object.reason); + return message; + }; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Compatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.compatible = false; + object.reason = ""; + } + if (message.compatible != null && message.hasOwnProperty("compatible")) + object.compatible = message.compatible; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + return object; + }; + + /** + * Converts this Compatibility to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + * @returns {Object.} JSON object + */ + Compatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Compatibility; + })(); + + return CompatibilityStatus; + })(); + + return Entity; + })(); + + v1.Partition = (function() { + + /** + * Properties of a Partition. + * @memberof google.cloud.dataplex.v1 + * @interface IPartition + * @property {string|null} [name] Partition name + * @property {Array.|null} [values] Partition values + * @property {string|null} [location] Partition location + * @property {string|null} [etag] Partition etag + */ + + /** + * Constructs a new Partition. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Partition. + * @implements IPartition + * @constructor + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + */ + function Partition(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Partition name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.name = ""; + + /** + * Partition values. + * @member {Array.} values + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.values = $util.emptyArray; + + /** + * Partition location. + * @member {string} location + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.location = ""; + + /** + * Partition etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.etag = ""; + + /** + * Creates a new Partition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Partition} Partition instance + */ + Partition.create = function create(properties) { + return new Partition(properties); + }; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encode = function encode(message, writer) { + 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.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + case 3: + message.location = reader.string(); + break; + case 4: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Partition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Partition.verify = function verify(message) { + if (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.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Partition} Partition + */ + Partition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Partition) + return object; + var message = new $root.google.cloud.dataplex.v1.Partition(); + if (object.name != null) + message.name = String(object.name); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.location != null) + message.location = String(object.location); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.Partition} message Partition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Partition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.name = ""; + object.location = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Partition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Partition + * @instance + * @returns {Object.} JSON object + */ + Partition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Partition; + })(); + + v1.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.dataplex.v1 + * @interface ISchema + * @property {boolean|null} [userManaged] Schema userManaged + * @property {Array.|null} [fields] Schema fields + * @property {Array.|null} [partitionFields] Schema partitionFields + * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.fields = []; + this.partitionFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Schema userManaged. + * @member {boolean} userManaged + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.userManaged = false; + + /** + * Schema fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.fields = $util.emptyArray; + + /** + * Schema partitionFields. + * @member {Array.} partitionFields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionFields = $util.emptyArray; + + /** + * Schema partitionStyle. + * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionStyle = 0; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.partitionFields != null && message.partitionFields.length) + for (var i = 0; i < message.partitionFields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.userManaged = reader.bool(); + break; + case 2: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.partitionFields && message.partitionFields.length)) + message.partitionFields = []; + message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); + break; + case 4: + message.partitionStyle = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schema message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + if (typeof message.userManaged !== "boolean") + return "userManaged: boolean expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { + if (!Array.isArray(message.partitionFields)) + return "partitionFields: array expected"; + for (var i = 0; i < message.partitionFields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); + if (error) + return "partitionFields." + error; + } + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + switch (message.partitionStyle) { + default: + return "partitionStyle: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema(); + if (object.userManaged != null) + message.userManaged = Boolean(object.userManaged); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + if (object.partitionFields) { + if (!Array.isArray(object.partitionFields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); + message.partitionFields = []; + for (var i = 0; i < object.partitionFields.length; ++i) { + if (typeof object.partitionFields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); + message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); + } + } + switch (object.partitionStyle) { + case "PARTITION_STYLE_UNSPECIFIED": + case 0: + message.partitionStyle = 0; + break; + case "HIVE_COMPATIBLE": + case 1: + message.partitionStyle = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.Schema} message Schema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.partitionFields = []; + } + if (options.defaults) { + object.userManaged = false; + object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; + } + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + object.userManaged = message.userManaged; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + if (message.partitionFields && message.partitionFields.length) { + object.partitionFields = []; + for (var j = 0; j < message.partitionFields.length; ++j) + object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Schema.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} BOOLEAN=1 BOOLEAN value + * @property {number} BYTE=2 BYTE value + * @property {number} INT16=3 INT16 value + * @property {number} INT32=4 INT32 value + * @property {number} INT64=5 INT64 value + * @property {number} FLOAT=6 FLOAT value + * @property {number} DOUBLE=7 DOUBLE value + * @property {number} DECIMAL=8 DECIMAL value + * @property {number} STRING=9 STRING value + * @property {number} BINARY=10 BINARY value + * @property {number} TIMESTAMP=11 TIMESTAMP value + * @property {number} DATE=12 DATE value + * @property {number} TIME=13 TIME value + * @property {number} RECORD=14 RECORD value + * @property {number} NULL=100 NULL value + */ + Schema.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOLEAN"] = 1; + values[valuesById[2] = "BYTE"] = 2; + values[valuesById[3] = "INT16"] = 3; + values[valuesById[4] = "INT32"] = 4; + values[valuesById[5] = "INT64"] = 5; + values[valuesById[6] = "FLOAT"] = 6; + values[valuesById[7] = "DOUBLE"] = 7; + values[valuesById[8] = "DECIMAL"] = 8; + values[valuesById[9] = "STRING"] = 9; + values[valuesById[10] = "BINARY"] = 10; + values[valuesById[11] = "TIMESTAMP"] = 11; + values[valuesById[12] = "DATE"] = 12; + values[valuesById[13] = "TIME"] = 13; + values[valuesById[14] = "RECORD"] = 14; + values[valuesById[100] = "NULL"] = 100; + return values; + })(); + + /** + * Mode enum. + * @name google.cloud.dataplex.v1.Schema.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} REQUIRED=1 REQUIRED value + * @property {number} NULLABLE=2 NULLABLE value + * @property {number} REPEATED=3 REPEATED value + */ + Schema.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REQUIRED"] = 1; + values[valuesById[2] = "NULLABLE"] = 2; + values[valuesById[3] = "REPEATED"] = 3; + return values; + })(); + + Schema.SchemaField = (function() { + + /** + * Properties of a SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface ISchemaField + * @property {string|null} [name] SchemaField name + * @property {string|null} [description] SchemaField description + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type + * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode + * @property {Array.|null} [fields] SchemaField fields + */ + + /** + * Constructs a new SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a SchemaField. + * @implements ISchemaField + * @constructor + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + */ + function SchemaField(properties) { + this.fields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.name = ""; + + /** + * SchemaField description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.description = ""; + + /** + * SchemaField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.type = 0; + + /** + * SchemaField mode. + * @member {google.cloud.dataplex.v1.Schema.Mode} mode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.mode = 0; + + /** + * SchemaField fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.fields = $util.emptyArray; + + /** + * Creates a new SchemaField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance + */ + SchemaField.create = function create(properties) { + return new SchemaField(properties); + }; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + case 4: + message.mode = reader.int32(); + break; + case 10: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaField message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + */ + SchemaField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "REQUIRED": + case 1: + message.mode = 1; + break; + case "NULLABLE": + case 2: + message.mode = 2; + break; + case "REPEATED": + case 3: + message.mode = 3; + break; + } + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + return object; + }; + + /** + * Converts this SchemaField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + * @returns {Object.} JSON object + */ + SchemaField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SchemaField; + })(); + + Schema.PartitionField = (function() { + + /** + * Properties of a PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface IPartitionField + * @property {string|null} [name] PartitionField name + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type + */ + + /** + * Constructs a new PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a PartitionField. + * @implements IPartitionField + * @constructor + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + */ + function PartitionField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.name = ""; + + /** + * PartitionField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.type = 0; + + /** + * Creates a new PartitionField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance + */ + PartitionField.create = function create(properties) { + return new PartitionField(properties); + }; + + /** + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionField.encode = function encode(message, writer) { + 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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionField message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + return null; + }; + + /** + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + */ + PartitionField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this PartitionField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + * @returns {Object.} JSON object + */ + PartitionField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartitionField; + })(); + + /** + * PartitionStyle enum. + * @name google.cloud.dataplex.v1.Schema.PartitionStyle + * @enum {number} + * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value + * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value + */ + Schema.PartitionStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; + return values; + })(); + + return Schema; + })(); + + v1.StorageFormat = (function() { + + /** + * Properties of a StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @interface IStorageFormat + * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format + * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat + * @property {string|null} [mimeType] StorageFormat mimeType + * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv + * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json + */ + + /** + * Constructs a new StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a StorageFormat. + * @implements IStorageFormat + * @constructor + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + */ + function StorageFormat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageFormat format. + * @member {google.cloud.dataplex.v1.StorageFormat.Format} format + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.format = 0; + + /** + * StorageFormat compressionFormat. + * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.compressionFormat = 0; + + /** + * StorageFormat mimeType. + * @member {string} mimeType + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.mimeType = ""; + + /** + * StorageFormat csv. + * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.csv = null; + + /** + * StorageFormat json. + * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.json = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StorageFormat options. + * @member {"csv"|"json"|undefined} options + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + Object.defineProperty(StorageFormat.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["csv", "json"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance + */ + StorageFormat.create = function create(properties) { + return new StorageFormat(properties); + }; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); + if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) + $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.json != null && Object.hasOwnProperty.call(message, "json")) + $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.format = reader.int32(); + break; + case 2: + message.compressionFormat = reader.int32(); + break; + case 3: + message.mimeType = reader.string(); + break; + case 10: + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); + break; + case 11: + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 100: + case 101: + case 200: + case 201: + case 202: + case 203: + case 204: + case 1000: + case 1001: + break; + } + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + switch (message.compressionFormat) { + default: + return "compressionFormat: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.csv != null && message.hasOwnProperty("csv")) { + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); + if (error) + return "csv." + error; + } + } + if (message.json != null && message.hasOwnProperty("json")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); + if (error) + return "json." + error; + } + } + return null; + }; + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + */ + StorageFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat(); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "PARQUET": + case 1: + message.format = 1; + break; + case "AVRO": + case 2: + message.format = 2; + break; + case "ORC": + case 3: + message.format = 3; + break; + case "CSV": + case 100: + message.format = 100; + break; + case "JSON": + case 101: + message.format = 101; + break; + case "IMAGE": + case 200: + message.format = 200; + break; + case "AUDIO": + case 201: + message.format = 201; + break; + case "VIDEO": + case 202: + message.format = 202; + break; + case "TEXT": + case 203: + message.format = 203; + break; + case "TFRECORD": + case 204: + message.format = 204; + break; + case "OTHER": + case 1000: + message.format = 1000; + break; + case "UNKNOWN": + case 1001: + message.format = 1001; + break; + } + switch (object.compressionFormat) { + case "COMPRESSION_FORMAT_UNSPECIFIED": + case 0: + message.compressionFormat = 0; + break; + case "GZIP": + case 2: + message.compressionFormat = 2; + break; + case "BZIP2": + case 3: + message.compressionFormat = 3; + break; + } + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.csv != null) { + if (typeof object.csv !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); + } + if (object.json != null) { + if (typeof object.json !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); + } + return message; + }; + + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; + object.mimeType = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.csv != null && message.hasOwnProperty("csv")) { + object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); + if (options.oneofs) + object.options = "csv"; + } + if (message.json != null && message.hasOwnProperty("json")) { + object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); + if (options.oneofs) + object.options = "json"; + } + return object; + }; + + /** + * Converts this StorageFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + * @returns {Object.} JSON object + */ + StorageFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + StorageFormat.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface ICsvOptions + * @property {string|null} [encoding] CsvOptions encoding + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [quote] CsvOptions quote + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions quote. + * @member {string} quote + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.quote = ""; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.headerRows = reader.int32(); + break; + case 3: + message.delimiter = reader.string(); + break; + case 4: + message.quote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.quote != null) + message.quote = String(object.quote); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.headerRows = 0; + object.delimiter = ""; + object.quote = ""; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CsvOptions; + })(); + + StorageFormat.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = ""; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JsonOptions; + })(); + + /** + * Format enum. + * @name google.cloud.dataplex.v1.StorageFormat.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} PARQUET=1 PARQUET value + * @property {number} AVRO=2 AVRO value + * @property {number} ORC=3 ORC value + * @property {number} CSV=100 CSV value + * @property {number} JSON=101 JSON value + * @property {number} IMAGE=200 IMAGE value + * @property {number} AUDIO=201 AUDIO value + * @property {number} VIDEO=202 VIDEO value + * @property {number} TEXT=203 TEXT value + * @property {number} TFRECORD=204 TFRECORD value + * @property {number} OTHER=1000 OTHER value + * @property {number} UNKNOWN=1001 UNKNOWN value + */ + StorageFormat.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARQUET"] = 1; + values[valuesById[2] = "AVRO"] = 2; + values[valuesById[3] = "ORC"] = 3; + values[valuesById[100] = "CSV"] = 100; + values[valuesById[101] = "JSON"] = 101; + values[valuesById[200] = "IMAGE"] = 200; + values[valuesById[201] = "AUDIO"] = 201; + values[valuesById[202] = "VIDEO"] = 202; + values[valuesById[203] = "TEXT"] = 203; + values[valuesById[204] = "TFRECORD"] = 204; + values[valuesById[1000] = "OTHER"] = 1000; + values[valuesById[1001] = "UNKNOWN"] = 1001; + return values; + })(); + + /** + * CompressionFormat enum. + * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat + * @enum {number} + * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value + * @property {number} GZIP=2 GZIP value + * @property {number} BZIP2=3 BZIP2 value + */ + StorageFormat.CompressionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[2] = "GZIP"] = 2; + values[valuesById[3] = "BZIP2"] = 3; + return values; + })(); + + return StorageFormat; + })(); + + /** + * StorageSystem enum. + * @name google.cloud.dataplex.v1.StorageSystem + * @enum {number} + * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value + * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + v1.StorageSystem = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_STORAGE"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + v1.Lake = (function() { + + /** + * Properties of a Lake. + * @memberof google.cloud.dataplex.v1 + * @interface ILake + * @property {string|null} [name] Lake name + * @property {string|null} [displayName] Lake displayName + * @property {string|null} [uid] Lake uid + * @property {google.protobuf.ITimestamp|null} [createTime] Lake createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Lake updateTime + * @property {Object.|null} [labels] Lake labels + * @property {string|null} [description] Lake description + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] Lake state + * @property {string|null} [serviceAccount] Lake serviceAccount + * @property {google.cloud.dataplex.v1.Lake.IMetastore|null} [metastore] Lake metastore + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Lake assetStatus + * @property {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null} [metastoreStatus] Lake metastoreStatus + */ + + /** + * Constructs a new Lake. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Lake. + * @implements ILake + * @constructor + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + */ + function Lake(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]]; + } + + /** + * Lake name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.name = ""; + + /** + * Lake displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.displayName = ""; + + /** + * Lake uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.uid = ""; + + /** + * Lake createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.createTime = null; + + /** + * Lake updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.updateTime = null; + + /** + * Lake labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.labels = $util.emptyObject; + + /** + * Lake description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.description = ""; + + /** + * Lake state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.state = 0; + + /** + * Lake serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.serviceAccount = ""; + + /** + * Lake metastore. + * @member {google.cloud.dataplex.v1.Lake.IMetastore|null|undefined} metastore + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastore = null; + + /** + * Lake assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.assetStatus = null; + + /** + * Lake metastoreStatus. + * @member {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null|undefined} metastoreStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastoreStatus = null; + + /** + * Creates a new Lake instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake} Lake instance + */ + Lake.create = function create(properties) { + return new Lake(properties); + }; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + 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 6, wireType 2 =*/50).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 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.metastore != null && Object.hasOwnProperty.call(message, "metastore")) + $root.google.cloud.dataplex.v1.Lake.Metastore.encode(message.metastore, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.metastoreStatus != null && Object.hasOwnProperty.call(message, "metastoreStatus")) + $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.encode(message.metastoreStatus, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.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 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.serviceAccount = reader.string(); + break; + case 102: + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); + break; + case 103: + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + case 104: + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Lake message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Lake.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.metastore != null && message.hasOwnProperty("metastore")) { + var error = $root.google.cloud.dataplex.v1.Lake.Metastore.verify(message.metastore); + if (error) + return "metastore." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) { + var error = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.verify(message.metastoreStatus); + if (error) + return "metastoreStatus." + error; + } + return null; + }; + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake} Lake + */ + Lake.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.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); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.metastore != null) { + if (typeof object.metastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastore: object expected"); + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.fromObject(object.metastore); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } + if (object.metastoreStatus != null) { + if (typeof object.metastoreStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastoreStatus: object expected"); + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.fromObject(object.metastoreStatus); + } + return message; + }; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.Lake} message Lake + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Lake.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.serviceAccount = ""; + object.metastore = null; + object.assetStatus = null; + object.metastoreStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.metastore != null && message.hasOwnProperty("metastore")) + object.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.toObject(message.metastore, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) + object.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.toObject(message.metastoreStatus, options); + return object; + }; + + /** + * Converts this Lake to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake + * @instance + * @returns {Object.} JSON object + */ + Lake.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Lake.Metastore = (function() { + + /** + * Properties of a Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastore + * @property {string|null} [service] Metastore service + */ + + /** + * Constructs a new Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a Metastore. + * @implements IMetastore + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + */ + function Metastore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metastore service. + * @member {string} service + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + */ + Metastore.prototype.service = ""; + + /** + * Creates a new Metastore instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore instance + */ + Metastore.create = function create(properties) { + return new Metastore(properties); + }; + + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; + + /** + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metastore message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metastore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metastore message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metastore.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; + + /** + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + */ + Metastore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.Metastore) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + if (object.service != null) + message.service = String(object.service); + return message; + }; + + /** + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.Metastore} message Metastore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metastore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; + + /** + * Converts this Metastore to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + * @returns {Object.} JSON object + */ + Metastore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metastore; + })(); + + Lake.MetastoreStatus = (function() { + + /** + * Properties of a MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastoreStatus + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] MetastoreStatus state + * @property {string|null} [message] MetastoreStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] MetastoreStatus updateTime + * @property {string|null} [endpoint] MetastoreStatus endpoint + */ + + /** + * Constructs a new MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a MetastoreStatus. + * @implements IMetastoreStatus + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + */ + function MetastoreStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetastoreStatus state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.state = 0; + + /** + * MetastoreStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.message = ""; + + /** + * MetastoreStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.updateTime = null; + + /** + * MetastoreStatus endpoint. + * @member {string} endpoint + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.endpoint = ""; + + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus instance + */ + MetastoreStatus.create = function create(properties) { + return new MetastoreStatus(properties); + }; + + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpoint); + return writer; + }; + + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endpoint = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetastoreStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetastoreStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + return null; + }; + + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + */ + MetastoreStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.MetastoreStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.MetastoreStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + return message; + }; + + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.MetastoreStatus} message MetastoreStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetastoreStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.endpoint = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + return object; + }; + + /** + * Converts this MetastoreStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + * @returns {Object.} JSON object + */ + MetastoreStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Lake.MetastoreStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} ERROR=4 ERROR value + */ + MetastoreStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return MetastoreStatus; + })(); + + return Lake; + })(); + + v1.AssetStatus = (function() { + + /** + * Properties of an AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @interface IAssetStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] AssetStatus updateTime + * @property {number|null} [activeAssets] AssetStatus activeAssets + * @property {number|null} [securityPolicyApplyingAssets] AssetStatus securityPolicyApplyingAssets + */ + + /** + * Constructs a new AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an AssetStatus. + * @implements IAssetStatus + * @constructor + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + */ + function AssetStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AssetStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.updateTime = null; + + /** + * AssetStatus activeAssets. + * @member {number} activeAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.activeAssets = 0; + + /** + * AssetStatus securityPolicyApplyingAssets. + * @member {number} securityPolicyApplyingAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.securityPolicyApplyingAssets = 0; + + /** + * Creates a new AssetStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus instance + */ + AssetStatus.create = function create(properties) { + return new AssetStatus(properties); + }; + + /** + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.activeAssets != null && Object.hasOwnProperty.call(message, "activeAssets")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.activeAssets); + if (message.securityPolicyApplyingAssets != null && Object.hasOwnProperty.call(message, "securityPolicyApplyingAssets")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.securityPolicyApplyingAssets); + return writer; + }; + + /** + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssetStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AssetStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.activeAssets = reader.int32(); + break; + case 3: + message.securityPolicyApplyingAssets = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssetStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) + if (!$util.isInteger(message.activeAssets)) + return "activeAssets: integer expected"; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + if (!$util.isInteger(message.securityPolicyApplyingAssets)) + return "securityPolicyApplyingAssets: integer expected"; + return null; + }; + + /** + * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + */ + AssetStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AssetStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.AssetStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.AssetStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.activeAssets != null) + message.activeAssets = object.activeAssets | 0; + if (object.securityPolicyApplyingAssets != null) + message.securityPolicyApplyingAssets = object.securityPolicyApplyingAssets | 0; + return message; + }; + + /** + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.AssetStatus} message AssetStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + object.activeAssets = 0; + object.securityPolicyApplyingAssets = 0; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) + object.activeAssets = message.activeAssets; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + object.securityPolicyApplyingAssets = message.securityPolicyApplyingAssets; + return object; + }; + + /** + * Converts this AssetStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + * @returns {Object.} JSON object + */ + AssetStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AssetStatus; + })(); + + v1.Zone = (function() { + + /** + * Properties of a Zone. + * @memberof google.cloud.dataplex.v1 + * @interface IZone + * @property {string|null} [name] Zone name + * @property {string|null} [displayName] Zone displayName + * @property {string|null} [uid] Zone uid + * @property {google.protobuf.ITimestamp|null} [createTime] Zone createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Zone updateTime + * @property {Object.|null} [labels] Zone labels + * @property {string|null} [description] Zone description + * @property {google.cloud.dataplex.v1.State|null} [state] Zone state + * @property {google.cloud.dataplex.v1.Zone.Type|null} [type] Zone type + * @property {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null} [discoverySpec] Zone discoverySpec + * @property {google.cloud.dataplex.v1.Zone.IResourceSpec|null} [resourceSpec] Zone resourceSpec + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Zone assetStatus + */ + + /** + * Constructs a new Zone. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Zone. + * @implements IZone + * @constructor + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set + */ + function Zone(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]]; + } + + /** + * Zone name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.name = ""; + + /** + * Zone displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.displayName = ""; + + /** + * Zone uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.uid = ""; + + /** + * Zone createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.createTime = null; + + /** + * Zone updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.updateTime = null; + + /** + * Zone labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.labels = $util.emptyObject; + + /** + * Zone description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.description = ""; + + /** + * Zone state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.state = 0; + + /** + * Zone type. + * @member {google.cloud.dataplex.v1.Zone.Type} type + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.type = 0; + + /** + * Zone discoverySpec. + * @member {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.discoverySpec = null; + + /** + * Zone resourceSpec. + * @member {google.cloud.dataplex.v1.Zone.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.resourceSpec = null; + + /** + * Zone assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.assetStatus = null; + + /** + * Creates a new Zone instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone} Zone instance + */ + Zone.create = function create(properties) { + return new Zone(properties); + }; + + /** + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zone.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + 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 6, wireType 2 =*/50).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 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.type); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Zone.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zone.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Zone message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone} Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zone.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.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 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.type = reader.int32(); + break; + case 103: + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); + break; + case 104: + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); + break; + case 105: + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Zone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone} Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Zone message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Zone.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.verify(message.resourceSpec); + if (error) + return "resourceSpec." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } + return null; + }; + + /** + * Creates a Zone message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone} Zone + */ + Zone.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.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); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "RAW": + case 1: + message.type = 1; + break; + case "CURATED": + case 2: + message.type = 2; + break; + } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.fromObject(object.resourceSpec); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } + return message; + }; + + /** + * Creates a plain object from a Zone message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.Zone} message Zone + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Zone.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.discoverySpec = null; + object.resourceSpec = null; + object.assetStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.Type[message.type] : message.type; + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.toObject(message.resourceSpec, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + return object; + }; + + /** + * Converts this Zone to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone + * @instance + * @returns {Object.} JSON object + */ + Zone.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Zone.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} RAW=1 RAW value + * @property {number} CURATED=2 CURATED value + */ + Zone.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RAW"] = 1; + values[valuesById[2] = "CURATED"] = 2; + return values; + })(); + + Zone.ResourceSpec = (function() { + + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IResourceSpec + * @property {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null} [locationType] ResourceSpec locationType + */ + + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceSpec locationType. + * @member {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType} locationType + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + */ + ResourceSpec.prototype.locationType = 0; + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locationType != null && Object.hasOwnProperty.call(message, "locationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.locationType); + return writer; + }; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.locationType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locationType != null && message.hasOwnProperty("locationType")) + switch (message.locationType) { + default: + return "locationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + switch (object.locationType) { + case "LOCATION_TYPE_UNSPECIFIED": + case 0: + message.locationType = 0; + break; + case "SINGLE_REGION": + case 1: + message.locationType = 1; + break; + case "MULTI_REGION": + case 2: + message.locationType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.locationType = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; + if (message.locationType != null && message.hasOwnProperty("locationType")) + object.locationType = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] : message.locationType; + return object; + }; + + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * LocationType enum. + * @name google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType + * @enum {number} + * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value + * @property {number} SINGLE_REGION=1 SINGLE_REGION value + * @property {number} MULTI_REGION=2 MULTI_REGION value + */ + ResourceSpec.LocationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SINGLE_REGION"] = 1; + values[valuesById[2] = "MULTI_REGION"] = 2; + return values; + })(); + + return ResourceSpec; + })(); + + Zone.DiscoverySpec = (function() { + + /** + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule + */ + + /** + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + */ + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.enabled = false; + + /** + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.includePatterns = $util.emptyArray; + + /** + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + + /** + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.csvOptions = null; + + /** + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; + + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec instance + */ + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); + }; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.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.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enabled = reader.bool(); + break; + case 2: + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + case 3: + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + case 4: + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + case 5: + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + case 10: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + */ + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec} message DiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this DiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DiscoverySpec.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headerRows = reader.int32(); + break; + case 2: + message.delimiter = reader.string(); + break; + case 3: + message.encoding = reader.string(); + break; + case 4: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CsvOptions; + })(); + + DiscoverySpec.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JsonOptions; + })(); + + return DiscoverySpec; + })(); + + return Zone; + })(); + + v1.Action = (function() { + + /** + * Properties of an Action. + * @memberof google.cloud.dataplex.v1 + * @interface IAction + * @property {google.cloud.dataplex.v1.Action.Category|null} [category] Action category + * @property {string|null} [issue] Action issue + * @property {google.protobuf.ITimestamp|null} [detectTime] Action detectTime + * @property {string|null} [name] Action name + * @property {string|null} [lake] Action lake + * @property {string|null} [zone] Action zone + * @property {string|null} [asset] Action asset + * @property {Array.|null} [dataLocations] Action dataLocations + * @property {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null} [invalidDataFormat] Action invalidDataFormat + * @property {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null} [incompatibleDataSchema] Action incompatibleDataSchema + * @property {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null} [invalidDataPartition] Action invalidDataPartition + * @property {google.cloud.dataplex.v1.Action.IMissingData|null} [missingData] Action missingData + * @property {google.cloud.dataplex.v1.Action.IMissingResource|null} [missingResource] Action missingResource + * @property {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null} [unauthorizedResource] Action unauthorizedResource + * @property {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null} [failedSecurityPolicyApply] Action failedSecurityPolicyApply + * @property {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null} [invalidDataOrganization] Action invalidDataOrganization + */ + + /** + * Constructs a new Action. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Action. + * @implements IAction + * @constructor + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + */ + function Action(properties) { + this.dataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Action category. + * @member {google.cloud.dataplex.v1.Action.Category} category + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.category = 0; + + /** + * Action issue. + * @member {string} issue + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.issue = ""; + + /** + * Action detectTime. + * @member {google.protobuf.ITimestamp|null|undefined} detectTime + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.detectTime = null; + + /** + * Action name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.name = ""; + + /** + * Action lake. + * @member {string} lake + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.lake = ""; + + /** + * Action zone. + * @member {string} zone + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.zone = ""; + + /** + * Action asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.asset = ""; + + /** + * Action dataLocations. + * @member {Array.} dataLocations + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.dataLocations = $util.emptyArray; + + /** + * Action invalidDataFormat. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null|undefined} invalidDataFormat + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataFormat = null; + + /** + * Action incompatibleDataSchema. + * @member {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null|undefined} incompatibleDataSchema + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.incompatibleDataSchema = null; + + /** + * Action invalidDataPartition. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null|undefined} invalidDataPartition + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataPartition = null; + + /** + * Action missingData. + * @member {google.cloud.dataplex.v1.Action.IMissingData|null|undefined} missingData + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingData = null; + + /** + * Action missingResource. + * @member {google.cloud.dataplex.v1.Action.IMissingResource|null|undefined} missingResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingResource = null; + + /** + * Action unauthorizedResource. + * @member {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null|undefined} unauthorizedResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.unauthorizedResource = null; + + /** + * Action failedSecurityPolicyApply. + * @member {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null|undefined} failedSecurityPolicyApply + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.failedSecurityPolicyApply = null; + + /** + * Action invalidDataOrganization. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null|undefined} invalidDataOrganization + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataOrganization = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Action details. + * @member {"invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"|undefined} details + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Object.defineProperty(Action.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["invalidDataFormat", "incompatibleDataSchema", "invalidDataPartition", "missingData", "missingResource", "unauthorizedResource", "failedSecurityPolicyApply", "invalidDataOrganization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Action instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action} Action instance + */ + Action.create = function create(properties) { + return new Action(properties); + }; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); + if (message.detectTime != null && Object.hasOwnProperty.call(message, "detectTime")) + $root.google.protobuf.Timestamp.encode(message.detectTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.lake); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.zone); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.asset); + if (message.dataLocations != null && message.dataLocations.length) + for (var i = 0; i < message.dataLocations.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataLocations[i]); + if (message.invalidDataFormat != null && Object.hasOwnProperty.call(message, "invalidDataFormat")) + $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.encode(message.invalidDataFormat, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.incompatibleDataSchema != null && Object.hasOwnProperty.call(message, "incompatibleDataSchema")) + $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.encode(message.incompatibleDataSchema, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.invalidDataPartition != null && Object.hasOwnProperty.call(message, "invalidDataPartition")) + $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.encode(message.invalidDataPartition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.missingData != null && Object.hasOwnProperty.call(message, "missingData")) + $root.google.cloud.dataplex.v1.Action.MissingData.encode(message.missingData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.missingResource != null && Object.hasOwnProperty.call(message, "missingResource")) + $root.google.cloud.dataplex.v1.Action.MissingResource.encode(message.missingResource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.unauthorizedResource != null && Object.hasOwnProperty.call(message, "unauthorizedResource")) + $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.encode(message.unauthorizedResource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.failedSecurityPolicyApply != null && Object.hasOwnProperty.call(message, "failedSecurityPolicyApply")) + $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.encode(message.failedSecurityPolicyApply, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.invalidDataOrganization != null && Object.hasOwnProperty.call(message, "invalidDataOrganization")) + $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.encode(message.invalidDataOrganization, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Action message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.category = reader.int32(); + break; + case 2: + message.issue = reader.string(); + break; + case 4: + message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.name = reader.string(); + break; + case 6: + message.lake = reader.string(); + break; + case 7: + message.zone = reader.string(); + break; + case 8: + message.asset = reader.string(); + break; + case 9: + if (!(message.dataLocations && message.dataLocations.length)) + message.dataLocations = []; + message.dataLocations.push(reader.string()); + break; + case 10: + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); + break; + case 11: + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); + break; + case 12: + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); + break; + case 13: + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); + break; + case 14: + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); + break; + case 15: + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); + break; + case 21: + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); + break; + case 22: + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Action message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Action.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.detectTime); + if (error) + return "detectTime." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) + if (!$util.isString(message.lake)) + return "lake: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataLocations != null && message.hasOwnProperty("dataLocations")) { + if (!Array.isArray(message.dataLocations)) + return "dataLocations: array expected"; + for (var i = 0; i < message.dataLocations.length; ++i) + if (!$util.isString(message.dataLocations[i])) + return "dataLocations: string[] expected"; + } + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.verify(message.invalidDataFormat); + if (error) + return "invalidDataFormat." + error; + } + } + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify(message.incompatibleDataSchema); + if (error) + return "incompatibleDataSchema." + error; + } + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.verify(message.invalidDataPartition); + if (error) + return "invalidDataPartition." + error; + } + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingData.verify(message.missingData); + if (error) + return "missingData." + error; + } + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingResource.verify(message.missingResource); + if (error) + return "missingResource." + error; + } + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.verify(message.unauthorizedResource); + if (error) + return "unauthorizedResource." + error; + } + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify(message.failedSecurityPolicyApply); + if (error) + return "failedSecurityPolicyApply." + error; + } + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify(message.invalidDataOrganization); + if (error) + return "invalidDataOrganization." + error; + } + } + return null; + }; + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action} Action + */ + Action.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action) + return object; + var message = new $root.google.cloud.dataplex.v1.Action(); + switch (object.category) { + case "CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "RESOURCE_MANAGEMENT": + case 1: + message.category = 1; + break; + case "SECURITY_POLICY": + case 2: + message.category = 2; + break; + case "DATA_DISCOVERY": + case 3: + message.category = 3; + break; + } + if (object.issue != null) + message.issue = String(object.issue); + if (object.detectTime != null) { + if (typeof object.detectTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.detectTime: object expected"); + message.detectTime = $root.google.protobuf.Timestamp.fromObject(object.detectTime); + } + if (object.name != null) + message.name = String(object.name); + if (object.lake != null) + message.lake = String(object.lake); + if (object.zone != null) + message.zone = String(object.zone); + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataLocations) { + if (!Array.isArray(object.dataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.dataLocations: array expected"); + message.dataLocations = []; + for (var i = 0; i < object.dataLocations.length; ++i) + message.dataLocations[i] = String(object.dataLocations[i]); + } + if (object.invalidDataFormat != null) { + if (typeof object.invalidDataFormat !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataFormat: object expected"); + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.fromObject(object.invalidDataFormat); + } + if (object.incompatibleDataSchema != null) { + if (typeof object.incompatibleDataSchema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.incompatibleDataSchema: object expected"); + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.fromObject(object.incompatibleDataSchema); + } + if (object.invalidDataPartition != null) { + if (typeof object.invalidDataPartition !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataPartition: object expected"); + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.fromObject(object.invalidDataPartition); + } + if (object.missingData != null) { + if (typeof object.missingData !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingData: object expected"); + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.fromObject(object.missingData); + } + if (object.missingResource != null) { + if (typeof object.missingResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingResource: object expected"); + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.fromObject(object.missingResource); + } + if (object.unauthorizedResource != null) { + if (typeof object.unauthorizedResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.unauthorizedResource: object expected"); + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.fromObject(object.unauthorizedResource); + } + if (object.failedSecurityPolicyApply != null) { + if (typeof object.failedSecurityPolicyApply !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.failedSecurityPolicyApply: object expected"); + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.fromObject(object.failedSecurityPolicyApply); + } + if (object.invalidDataOrganization != null) { + if (typeof object.invalidDataOrganization !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataOrganization: object expected"); + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.fromObject(object.invalidDataOrganization); + } + return message; + }; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.Action} message Action + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Action.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataLocations = []; + if (options.defaults) { + object.category = options.enums === String ? "CATEGORY_UNSPECIFIED" : 0; + object.issue = ""; + object.detectTime = null; + object.name = ""; + object.lake = ""; + object.zone = ""; + object.asset = ""; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.cloud.dataplex.v1.Action.Category[message.category] : message.category; + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) + object.detectTime = $root.google.protobuf.Timestamp.toObject(message.detectTime, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = message.lake; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataLocations && message.dataLocations.length) { + object.dataLocations = []; + for (var j = 0; j < message.dataLocations.length; ++j) + object.dataLocations[j] = message.dataLocations[j]; + } + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + object.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.toObject(message.invalidDataFormat, options); + if (options.oneofs) + object.details = "invalidDataFormat"; + } + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + object.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.toObject(message.incompatibleDataSchema, options); + if (options.oneofs) + object.details = "incompatibleDataSchema"; + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + object.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.toObject(message.invalidDataPartition, options); + if (options.oneofs) + object.details = "invalidDataPartition"; + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + object.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.toObject(message.missingData, options); + if (options.oneofs) + object.details = "missingData"; + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + object.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.toObject(message.missingResource, options); + if (options.oneofs) + object.details = "missingResource"; + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + object.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.toObject(message.unauthorizedResource, options); + if (options.oneofs) + object.details = "unauthorizedResource"; + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + object.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.toObject(message.failedSecurityPolicyApply, options); + if (options.oneofs) + object.details = "failedSecurityPolicyApply"; + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + object.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.toObject(message.invalidDataOrganization, options); + if (options.oneofs) + object.details = "invalidDataOrganization"; + } + return object; + }; + + /** + * Converts this Action to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action + * @instance + * @returns {Object.} JSON object + */ + Action.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Category enum. + * @name google.cloud.dataplex.v1.Action.Category + * @enum {number} + * @property {number} CATEGORY_UNSPECIFIED=0 CATEGORY_UNSPECIFIED value + * @property {number} RESOURCE_MANAGEMENT=1 RESOURCE_MANAGEMENT value + * @property {number} SECURITY_POLICY=2 SECURITY_POLICY value + * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value + */ + Action.Category = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_MANAGEMENT"] = 1; + values[valuesById[2] = "SECURITY_POLICY"] = 2; + values[valuesById[3] = "DATA_DISCOVERY"] = 3; + return values; + })(); + + Action.MissingResource = (function() { + + /** + * Properties of a MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingResource + */ + + /** + * Constructs a new MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingResource. + * @implements IMissingResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + */ + function MissingResource(properties) { + if (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 MissingResource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource instance + */ + MissingResource.create = function create(properties) { + return new MissingResource(properties); + }; + + /** + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MissingResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MissingResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MissingResource message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissingResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + */ + MissingResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingResource) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingResource(); + }; + + /** + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.MissingResource} message MissingResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissingResource.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MissingResource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @instance + * @returns {Object.} JSON object + */ + MissingResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MissingResource; + })(); + + Action.UnauthorizedResource = (function() { + + /** + * Properties of an UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IUnauthorizedResource + */ + + /** + * Constructs a new UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an UnauthorizedResource. + * @implements IUnauthorizedResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + */ + function UnauthorizedResource(properties) { + if (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 UnauthorizedResource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource instance + */ + UnauthorizedResource.create = function create(properties) { + return new UnauthorizedResource(properties); + }; + + /** + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnauthorizedResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnauthorizedResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnauthorizedResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnauthorizedResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnauthorizedResource message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnauthorizedResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + */ + UnauthorizedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.UnauthorizedResource) + return object; + return new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); + }; + + /** + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.UnauthorizedResource} message UnauthorizedResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnauthorizedResource.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UnauthorizedResource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @instance + * @returns {Object.} JSON object + */ + UnauthorizedResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnauthorizedResource; + })(); + + Action.FailedSecurityPolicyApply = (function() { + + /** + * Properties of a FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @interface IFailedSecurityPolicyApply + * @property {string|null} [asset] FailedSecurityPolicyApply asset + */ + + /** + * Constructs a new FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a FailedSecurityPolicyApply. + * @implements IFailedSecurityPolicyApply + * @constructor + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set + */ + function FailedSecurityPolicyApply(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FailedSecurityPolicyApply asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @instance + */ + FailedSecurityPolicyApply.prototype.asset = ""; + + /** + * Creates a new FailedSecurityPolicyApply instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply instance + */ + FailedSecurityPolicyApply.create = function create(properties) { + return new FailedSecurityPolicyApply(properties); + }; + + /** + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailedSecurityPolicyApply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.asset); + return writer; + }; + + /** + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailedSecurityPolicyApply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailedSecurityPolicyApply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.asset = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailedSecurityPolicyApply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FailedSecurityPolicyApply message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FailedSecurityPolicyApply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + return null; + }; + + /** + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + */ + FailedSecurityPolicyApply.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); + if (object.asset != null) + message.asset = String(object.asset); + return message; + }; + + /** + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} message FailedSecurityPolicyApply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FailedSecurityPolicyApply.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.asset = ""; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + return object; + }; + + /** + * Converts this FailedSecurityPolicyApply to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @instance + * @returns {Object.} JSON object + */ + FailedSecurityPolicyApply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FailedSecurityPolicyApply; + })(); + + Action.InvalidDataFormat = (function() { + + /** + * Properties of an InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataFormat + * @property {Array.|null} [sampledDataLocations] InvalidDataFormat sampledDataLocations + * @property {string|null} [expectedFormat] InvalidDataFormat expectedFormat + * @property {string|null} [newFormat] InvalidDataFormat newFormat + */ + + /** + * Constructs a new InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataFormat. + * @implements IInvalidDataFormat + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + */ + function InvalidDataFormat(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvalidDataFormat sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.sampledDataLocations = $util.emptyArray; + + /** + * InvalidDataFormat expectedFormat. + * @member {string} expectedFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.expectedFormat = ""; + + /** + * InvalidDataFormat newFormat. + * @member {string} newFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.newFormat = ""; + + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat instance + */ + InvalidDataFormat.create = function create(properties) { + return new InvalidDataFormat(properties); + }; + + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sampledDataLocations[i]); + if (message.expectedFormat != null && Object.hasOwnProperty.call(message, "expectedFormat")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedFormat); + if (message.newFormat != null && Object.hasOwnProperty.call(message, "newFormat")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newFormat); + return writer; + }; + + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + case 2: + message.expectedFormat = reader.string(); + break; + case 3: + message.newFormat = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + if (!$util.isString(message.expectedFormat)) + return "expectedFormat: string expected"; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + if (!$util.isString(message.newFormat)) + return "newFormat: string expected"; + return null; + }; + + /** + * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + */ + InvalidDataFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataFormat) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.InvalidDataFormat.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + if (object.expectedFormat != null) + message.expectedFormat = String(object.expectedFormat); + if (object.newFormat != null) + message.newFormat = String(object.newFormat); + return message; + }; + + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataFormat} message InvalidDataFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.expectedFormat = ""; + object.newFormat = ""; + } + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + object.expectedFormat = message.expectedFormat; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + object.newFormat = message.newFormat; + return object; + }; + + /** + * Converts this InvalidDataFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + * @returns {Object.} JSON object + */ + InvalidDataFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvalidDataFormat; + })(); + + Action.IncompatibleDataSchema = (function() { + + /** + * Properties of an IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @interface IIncompatibleDataSchema + * @property {string|null} [table] IncompatibleDataSchema table + * @property {string|null} [existingSchema] IncompatibleDataSchema existingSchema + * @property {string|null} [newSchema] IncompatibleDataSchema newSchema + * @property {Array.|null} [sampledDataLocations] IncompatibleDataSchema sampledDataLocations + * @property {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null} [schemaChange] IncompatibleDataSchema schemaChange + */ + + /** + * Constructs a new IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an IncompatibleDataSchema. + * @implements IIncompatibleDataSchema + * @constructor + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set + */ + function IncompatibleDataSchema(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncompatibleDataSchema table. + * @member {string} table + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.table = ""; + + /** + * IncompatibleDataSchema existingSchema. + * @member {string} existingSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.existingSchema = ""; + + /** + * IncompatibleDataSchema newSchema. + * @member {string} newSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.newSchema = ""; + + /** + * IncompatibleDataSchema sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.sampledDataLocations = $util.emptyArray; + + /** + * IncompatibleDataSchema schemaChange. + * @member {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange} schemaChange + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.schemaChange = 0; + + /** + * Creates a new IncompatibleDataSchema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema instance + */ + IncompatibleDataSchema.create = function create(properties) { + return new IncompatibleDataSchema(properties); + }; + + /** + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncompatibleDataSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.existingSchema != null && Object.hasOwnProperty.call(message, "existingSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.existingSchema); + if (message.newSchema != null && Object.hasOwnProperty.call(message, "newSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSchema); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); + if (message.schemaChange != null && Object.hasOwnProperty.call(message, "schemaChange")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.schemaChange); + return writer; + }; + + /** + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncompatibleDataSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncompatibleDataSchema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.table = reader.string(); + break; + case 2: + message.existingSchema = reader.string(); + break; + case 3: + message.newSchema = reader.string(); + break; + case 4: + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + case 5: + message.schemaChange = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncompatibleDataSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncompatibleDataSchema message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncompatibleDataSchema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + if (!$util.isString(message.existingSchema)) + return "existingSchema: string expected"; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + if (!$util.isString(message.newSchema)) + return "newSchema: string expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + switch (message.schemaChange) { + default: + return "schemaChange: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + */ + IncompatibleDataSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); + if (object.table != null) + message.table = String(object.table); + if (object.existingSchema != null) + message.existingSchema = String(object.existingSchema); + if (object.newSchema != null) + message.newSchema = String(object.newSchema); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + switch (object.schemaChange) { + case "SCHEMA_CHANGE_UNSPECIFIED": + case 0: + message.schemaChange = 0; + break; + case "INCOMPATIBLE": + case 1: + message.schemaChange = 1; + break; + case "MODIFIED": + case 2: + message.schemaChange = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} message IncompatibleDataSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncompatibleDataSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.table = ""; + object.existingSchema = ""; + object.newSchema = ""; + object.schemaChange = options.enums === String ? "SCHEMA_CHANGE_UNSPECIFIED" : 0; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + object.existingSchema = message.existingSchema; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + object.newSchema = message.newSchema; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + object.schemaChange = options.enums === String ? $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] : message.schemaChange; + return object; + }; + + /** + * Converts this IncompatibleDataSchema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + * @returns {Object.} JSON object + */ + IncompatibleDataSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * SchemaChange enum. + * @name google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange + * @enum {number} + * @property {number} SCHEMA_CHANGE_UNSPECIFIED=0 SCHEMA_CHANGE_UNSPECIFIED value + * @property {number} INCOMPATIBLE=1 INCOMPATIBLE value + * @property {number} MODIFIED=2 MODIFIED value + */ + IncompatibleDataSchema.SchemaChange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_CHANGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCOMPATIBLE"] = 1; + values[valuesById[2] = "MODIFIED"] = 2; + return values; + })(); + + return IncompatibleDataSchema; + })(); + + Action.InvalidDataPartition = (function() { + + /** + * Properties of an InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataPartition + * @property {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null} [expectedStructure] InvalidDataPartition expectedStructure + */ + + /** + * Constructs a new InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataPartition. + * @implements IInvalidDataPartition + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + */ + function InvalidDataPartition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvalidDataPartition expectedStructure. + * @member {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure} expectedStructure + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @instance + */ + InvalidDataPartition.prototype.expectedStructure = 0; + + /** + * Creates a new InvalidDataPartition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition instance + */ + InvalidDataPartition.create = function create(properties) { + return new InvalidDataPartition(properties); + }; + + /** + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataPartition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expectedStructure != null && Object.hasOwnProperty.call(message, "expectedStructure")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expectedStructure); + return writer; + }; + + /** + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataPartition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataPartition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.expectedStructure = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataPartition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataPartition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataPartition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + switch (message.expectedStructure) { + default: + return "expectedStructure: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + */ + InvalidDataPartition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataPartition) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); + switch (object.expectedStructure) { + case "PARTITION_STRUCTURE_UNSPECIFIED": + case 0: + message.expectedStructure = 0; + break; + case "CONSISTENT_KEYS": + case 1: + message.expectedStructure = 1; + break; + case "HIVE_STYLE_KEYS": + case 2: + message.expectedStructure = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataPartition} message InvalidDataPartition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataPartition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expectedStructure = options.enums === String ? "PARTITION_STRUCTURE_UNSPECIFIED" : 0; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + object.expectedStructure = options.enums === String ? $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] : message.expectedStructure; + return object; + }; + + /** + * Converts this InvalidDataPartition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @instance + * @returns {Object.} JSON object + */ + InvalidDataPartition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PartitionStructure enum. + * @name google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure + * @enum {number} + * @property {number} PARTITION_STRUCTURE_UNSPECIFIED=0 PARTITION_STRUCTURE_UNSPECIFIED value + * @property {number} CONSISTENT_KEYS=1 CONSISTENT_KEYS value + * @property {number} HIVE_STYLE_KEYS=2 HIVE_STYLE_KEYS value + */ + InvalidDataPartition.PartitionStructure = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STRUCTURE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSISTENT_KEYS"] = 1; + values[valuesById[2] = "HIVE_STYLE_KEYS"] = 2; + return values; + })(); + + return InvalidDataPartition; + })(); + + Action.MissingData = (function() { + + /** + * Properties of a MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingData + */ + + /** + * Constructs a new MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingData. + * @implements IMissingData + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + */ + function MissingData(properties) { + if (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 MissingData instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData instance + */ + MissingData.create = function create(properties) { + return new MissingData(properties); + }; + + /** + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MissingData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MissingData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MissingData message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissingData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + */ + MissingData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingData) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingData(); + }; + + /** + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.MissingData} message MissingData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissingData.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MissingData to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @instance + * @returns {Object.} JSON object + */ + MissingData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MissingData; + })(); + + Action.InvalidDataOrganization = (function() { + + /** + * Properties of an InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataOrganization + */ + + /** + * Constructs a new InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataOrganization. + * @implements IInvalidDataOrganization + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + */ + function InvalidDataOrganization(properties) { + if (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 InvalidDataOrganization instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization instance + */ + InvalidDataOrganization.create = function create(properties) { + return new InvalidDataOrganization(properties); + }; + + /** + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataOrganization message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataOrganization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + */ + InvalidDataOrganization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization) + return object; + return new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + }; + + /** + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataOrganization} message InvalidDataOrganization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataOrganization.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InvalidDataOrganization to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @instance + * @returns {Object.} JSON object + */ + InvalidDataOrganization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvalidDataOrganization; + })(); + + return Action; + })(); + + v1.Asset = (function() { + + /** + * Properties of an Asset. + * @memberof google.cloud.dataplex.v1 + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {string|null} [displayName] Asset displayName + * @property {string|null} [uid] Asset uid + * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime + * @property {Object.|null} [labels] Asset labels + * @property {string|null} [description] Asset description + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] Asset state + * @property {google.cloud.dataplex.v1.Asset.IResourceSpec|null} [resourceSpec] Asset resourceSpec + * @property {google.cloud.dataplex.v1.Asset.IResourceStatus|null} [resourceStatus] Asset resourceStatus + * @property {google.cloud.dataplex.v1.Asset.ISecurityStatus|null} [securityStatus] Asset securityStatus + * @property {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null} [discoverySpec] Asset discoverySpec + * @property {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null} [discoveryStatus] Asset discoveryStatus + */ + + /** + * Constructs a new Asset. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Asset. + * @implements IAsset + * @constructor + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set + */ + function Asset(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]]; + } + + /** + * Asset name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.name = ""; + + /** + * Asset displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.displayName = ""; + + /** + * Asset uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.uid = ""; + + /** + * Asset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.createTime = null; + + /** + * Asset updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.updateTime = null; + + /** + * Asset labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.labels = $util.emptyObject; + + /** + * Asset description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.description = ""; + + /** + * Asset state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.state = 0; + + /** + * Asset resourceSpec. + * @member {google.cloud.dataplex.v1.Asset.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceSpec = null; + + /** + * Asset resourceStatus. + * @member {google.cloud.dataplex.v1.Asset.IResourceStatus|null|undefined} resourceStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceStatus = null; + + /** + * Asset securityStatus. + * @member {google.cloud.dataplex.v1.Asset.ISecurityStatus|null|undefined} securityStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.securityStatus = null; + + /** + * Asset discoverySpec. + * @member {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoverySpec = null; + + /** + * Asset discoveryStatus. + * @member {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null|undefined} discoveryStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoveryStatus = null; + + /** + * Creates a new Asset instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset} Asset instance + */ + Asset.create = function create(properties) { + return new Asset(properties); + }; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + 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 6, wireType 2 =*/50).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 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Asset.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.resourceStatus != null && Object.hasOwnProperty.call(message, "resourceStatus")) + $root.google.cloud.dataplex.v1.Asset.ResourceStatus.encode(message.resourceStatus, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.securityStatus != null && Object.hasOwnProperty.call(message, "securityStatus")) + $root.google.cloud.dataplex.v1.Asset.SecurityStatus.encode(message.securityStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); + if (message.discoveryStatus != null && Object.hasOwnProperty.call(message, "discoveryStatus")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.encode(message.discoveryStatus, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset} Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Asset.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.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 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 100: + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); + break; + case 101: + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); + break; + case 103: + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); + break; + case 106: + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); + break; + case 107: + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset} Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Asset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Asset message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Asset.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.verify(message.resourceSpec); + if (error) + return "resourceSpec." + error; + } + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.verify(message.resourceStatus); + if (error) + return "resourceStatus." + error; + } + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.verify(message.securityStatus); + if (error) + return "securityStatus." + error; + } + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify(message.discoveryStatus); + if (error) + return "discoveryStatus." + error; + } + return null; + }; + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset} Asset + */ + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.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); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "APPLYING": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.fromObject(object.resourceSpec); + } + if (object.resourceStatus != null) { + if (typeof object.resourceStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceStatus: object expected"); + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.fromObject(object.resourceStatus); + } + if (object.securityStatus != null) { + if (typeof object.securityStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.securityStatus: object expected"); + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.fromObject(object.securityStatus); + } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.discoveryStatus != null) { + if (typeof object.discoveryStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoveryStatus: object expected"); + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.fromObject(object.discoveryStatus); + } + return message; + }; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.Asset} message Asset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Asset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceSpec = null; + object.resourceStatus = null; + object.securityStatus = null; + object.discoverySpec = null; + object.discoveryStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.toObject(message.resourceSpec, options); + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) + object.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.toObject(message.resourceStatus, options); + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) + object.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.toObject(message.securityStatus, options); + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) + object.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.toObject(message.discoveryStatus, options); + return object; + }; + + /** + * Converts this Asset to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset + * @instance + * @returns {Object.} JSON object + */ + Asset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Asset.SecurityStatus = (function() { + + /** + * Properties of a SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface ISecurityStatus + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] SecurityStatus state + * @property {string|null} [message] SecurityStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityStatus updateTime + */ + + /** + * Constructs a new SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a SecurityStatus. + * @implements ISecurityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + */ + function SecurityStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityStatus state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.state = 0; + + /** + * SecurityStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.message = ""; + + /** + * SecurityStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.updateTime = null; + + /** + * Creates a new SecurityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus instance + */ + SecurityStatus.create = function create(properties) { + return new SecurityStatus(properties); + }; + + /** + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + */ + SecurityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.SecurityStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "APPLYING": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.SecurityStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.SecurityStatus} message SecurityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this SecurityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + * @returns {Object.} JSON object + */ + SecurityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.SecurityStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} APPLYING=2 APPLYING value + * @property {number} ERROR=3 ERROR value + */ + SecurityStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "APPLYING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + return SecurityStatus; + })(); + + Asset.DiscoverySpec = (function() { + + /** + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule + */ + + /** + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set + */ + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.enabled = false; + + /** + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.includePatterns = $util.emptyArray; + + /** + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + + /** + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.csvOptions = null; + + /** + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; + + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec instance + */ + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); + }; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.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.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enabled = reader.bool(); + break; + case 2: + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + case 3: + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + case 4: + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + case 5: + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + case 10: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + */ + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec} message DiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this DiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DiscoverySpec.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headerRows = reader.int32(); + break; + case 2: + message.delimiter = reader.string(); + break; + case 3: + message.encoding = reader.string(); + break; + case 4: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CsvOptions; + })(); + + DiscoverySpec.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JsonOptions; + })(); + + return DiscoverySpec; + })(); + + Asset.ResourceSpec = (function() { + + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceSpec + * @property {string|null} [name] ResourceSpec name + * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null} [type] ResourceSpec type + */ + + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceSpec name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.name = ""; + + /** + * ResourceSpec type. + * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.Type} type + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.type = 0; + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + 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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STORAGE_BUCKET": + case 1: + message.type = 1; + break; + case "BIGQUERY_DATASET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Asset.ResourceSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} STORAGE_BUCKET=1 STORAGE_BUCKET value + * @property {number} BIGQUERY_DATASET=2 BIGQUERY_DATASET value + */ + ResourceSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STORAGE_BUCKET"] = 1; + values[valuesById[2] = "BIGQUERY_DATASET"] = 2; + return values; + })(); + + return ResourceSpec; + })(); + + Asset.ResourceStatus = (function() { + + /** + * Properties of a ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceStatus + * @property {google.cloud.dataplex.v1.Asset.ResourceStatus.State|null} [state] ResourceStatus state + * @property {string|null} [message] ResourceStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceStatus updateTime + */ + + /** + * Constructs a new ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceStatus. + * @implements IResourceStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set + */ + function ResourceStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceStatus state. + * @member {google.cloud.dataplex.v1.Asset.ResourceStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.state = 0; + + /** + * ResourceStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.message = ""; + + /** + * ResourceStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.updateTime = null; + + /** + * Creates a new ResourceStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus instance + */ + ResourceStatus.create = function create(properties) { + return new ResourceStatus(properties); + }; + + /** + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + */ + ResourceStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "ERROR": + case 2: + message.state = 2; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.ResourceStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ResourceStatus} message ResourceStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this ResourceStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + * @returns {Object.} JSON object + */ + ResourceStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.ResourceStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} ERROR=2 ERROR value + */ + ResourceStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "ERROR"] = 2; + return values; + })(); + + return ResourceStatus; + })(); + + Asset.DiscoveryStatus = (function() { + + /** + * Properties of a DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoveryStatus + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null} [state] DiscoveryStatus state + * @property {string|null} [message] DiscoveryStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryStatus updateTime + * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryStatus lastRunTime + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null} [stats] DiscoveryStatus stats + * @property {google.protobuf.IDuration|null} [lastRunDuration] DiscoveryStatus lastRunDuration + */ + + /** + * Constructs a new DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoveryStatus. + * @implements IDiscoveryStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set + */ + function DiscoveryStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryStatus state. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.state = 0; + + /** + * DiscoveryStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.message = ""; + + /** + * DiscoveryStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.updateTime = null; + + /** + * DiscoveryStatus lastRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.lastRunTime = null; + + /** + * DiscoveryStatus stats. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null|undefined} stats + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.stats = null; + + /** + * DiscoveryStatus lastRunDuration. + * @member {google.protobuf.IDuration|null|undefined} lastRunDuration + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.lastRunDuration = null; + + /** + * Creates a new DiscoveryStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus instance + */ + DiscoveryStatus.create = function create(properties) { + return new DiscoveryStatus(properties); + }; + + /** + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) + $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.encode(message.stats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastRunDuration != null && Object.hasOwnProperty.call(message, "lastRunDuration")) + $root.google.protobuf.Duration.encode(message.lastRunDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); + break; + case 7: + message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); + if (error) + return "lastRunTime." + error; + } + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify(message.stats); + if (error) + return "stats." + error; + } + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) { + var error = $root.google.protobuf.Duration.verify(message.lastRunDuration); + if (error) + return "lastRunDuration." + error; + } + return null; + }; + + /** + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + */ + DiscoveryStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SCHEDULED": + case 1: + message.state = 1; + break; + case "IN_PROGRESS": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "DISABLED": + case 5: + message.state = 5; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastRunTime != null) { + if (typeof object.lastRunTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunTime: object expected"); + message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); + } + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.stats: object expected"); + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.fromObject(object.stats); + } + if (object.lastRunDuration != null) { + if (typeof object.lastRunDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunDuration: object expected"); + message.lastRunDuration = $root.google.protobuf.Duration.fromObject(object.lastRunDuration); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus} message DiscoveryStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.lastRunTime = null; + object.stats = null; + object.lastRunDuration = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) + object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.toObject(message.stats, options); + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) + object.lastRunDuration = $root.google.protobuf.Duration.toObject(message.lastRunDuration, options); + return object; + }; + + /** + * Converts this DiscoveryStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + * @returns {Object.} JSON object + */ + DiscoveryStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.DiscoveryStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} PAUSED=3 PAUSED value + * @property {number} DISABLED=5 DISABLED value + */ + DiscoveryStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[5] = "DISABLED"] = 5; + return values; + })(); + + DiscoveryStatus.Stats = (function() { + + /** + * Properties of a Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @interface IStats + * @property {number|Long|null} [dataItems] Stats dataItems + * @property {number|Long|null} [dataSize] Stats dataSize + * @property {number|Long|null} [tables] Stats tables + * @property {number|Long|null} [filesets] Stats filesets + */ + + /** + * Constructs a new Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @classdesc Represents a Stats. + * @implements IStats + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set + */ + function Stats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Stats dataItems. + * @member {number|Long} dataItems + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.dataItems = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats dataSize. + * @member {number|Long} dataSize + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats tables. + * @member {number|Long} tables + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.tables = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats filesets. + * @member {number|Long} filesets + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.filesets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Stats instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats instance + */ + Stats.create = function create(properties) { + return new Stats(properties); + }; + + /** + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataItems != null && Object.hasOwnProperty.call(message, "dataItems")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItems); + if (message.dataSize != null && Object.hasOwnProperty.call(message, "dataSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.dataSize); + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tables); + if (message.filesets != null && Object.hasOwnProperty.call(message, "filesets")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filesets); + return writer; + }; + + /** + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Stats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dataItems = reader.int64(); + break; + case 2: + message.dataSize = reader.int64(); + break; + case 3: + message.tables = reader.int64(); + break; + case 4: + message.filesets = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Stats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Stats message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Stats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (!$util.isInteger(message.dataItems) && !(message.dataItems && $util.isInteger(message.dataItems.low) && $util.isInteger(message.dataItems.high))) + return "dataItems: integer|Long expected"; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (!$util.isInteger(message.dataSize) && !(message.dataSize && $util.isInteger(message.dataSize.low) && $util.isInteger(message.dataSize.high))) + return "dataSize: integer|Long expected"; + if (message.tables != null && message.hasOwnProperty("tables")) + if (!$util.isInteger(message.tables) && !(message.tables && $util.isInteger(message.tables.low) && $util.isInteger(message.tables.high))) + return "tables: integer|Long expected"; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (!$util.isInteger(message.filesets) && !(message.filesets && $util.isInteger(message.filesets.low) && $util.isInteger(message.filesets.high))) + return "filesets: integer|Long expected"; + return null; + }; + + /** + * Creates a Stats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + */ + Stats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); + if (object.dataItems != null) + if ($util.Long) + (message.dataItems = $util.Long.fromValue(object.dataItems)).unsigned = false; + else if (typeof object.dataItems === "string") + message.dataItems = parseInt(object.dataItems, 10); + else if (typeof object.dataItems === "number") + message.dataItems = object.dataItems; + else if (typeof object.dataItems === "object") + message.dataItems = new $util.LongBits(object.dataItems.low >>> 0, object.dataItems.high >>> 0).toNumber(); + if (object.dataSize != null) + if ($util.Long) + (message.dataSize = $util.Long.fromValue(object.dataSize)).unsigned = false; + else if (typeof object.dataSize === "string") + message.dataSize = parseInt(object.dataSize, 10); + else if (typeof object.dataSize === "number") + message.dataSize = object.dataSize; + else if (typeof object.dataSize === "object") + message.dataSize = new $util.LongBits(object.dataSize.low >>> 0, object.dataSize.high >>> 0).toNumber(); + if (object.tables != null) + if ($util.Long) + (message.tables = $util.Long.fromValue(object.tables)).unsigned = false; + else if (typeof object.tables === "string") + message.tables = parseInt(object.tables, 10); + else if (typeof object.tables === "number") + message.tables = object.tables; + else if (typeof object.tables === "object") + message.tables = new $util.LongBits(object.tables.low >>> 0, object.tables.high >>> 0).toNumber(); + if (object.filesets != null) + if ($util.Long) + (message.filesets = $util.Long.fromValue(object.filesets)).unsigned = false; + else if (typeof object.filesets === "string") + message.filesets = parseInt(object.filesets, 10); + else if (typeof object.filesets === "number") + message.filesets = object.filesets; + else if (typeof object.filesets === "object") + message.filesets = new $util.LongBits(object.filesets.low >>> 0, object.filesets.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Stats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} message Stats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Stats.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.dataItems = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataItems = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tables = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tables = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.filesets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.filesets = options.longs === String ? "0" : 0; + } + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (typeof message.dataItems === "number") + object.dataItems = options.longs === String ? String(message.dataItems) : message.dataItems; + else + object.dataItems = options.longs === String ? $util.Long.prototype.toString.call(message.dataItems) : options.longs === Number ? new $util.LongBits(message.dataItems.low >>> 0, message.dataItems.high >>> 0).toNumber() : message.dataItems; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (typeof message.dataSize === "number") + object.dataSize = options.longs === String ? String(message.dataSize) : message.dataSize; + else + object.dataSize = options.longs === String ? $util.Long.prototype.toString.call(message.dataSize) : options.longs === Number ? new $util.LongBits(message.dataSize.low >>> 0, message.dataSize.high >>> 0).toNumber() : message.dataSize; + if (message.tables != null && message.hasOwnProperty("tables")) + if (typeof message.tables === "number") + object.tables = options.longs === String ? String(message.tables) : message.tables; + else + object.tables = options.longs === String ? $util.Long.prototype.toString.call(message.tables) : options.longs === Number ? new $util.LongBits(message.tables.low >>> 0, message.tables.high >>> 0).toNumber() : message.tables; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (typeof message.filesets === "number") + object.filesets = options.longs === String ? String(message.filesets) : message.filesets; + else + object.filesets = options.longs === String ? $util.Long.prototype.toString.call(message.filesets) : options.longs === Number ? new $util.LongBits(message.filesets.low >>> 0, message.filesets.high >>> 0).toNumber() : message.filesets; + return object; + }; + + /** + * Converts this Stats to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + * @returns {Object.} JSON object + */ + Stats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Stats; + })(); + + return DiscoveryStatus; + })(); + + return Asset; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} ACTION_REQUIRED=4 ACTION_REQUIRED value + */ + v1.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ACTION_REQUIRED"] = 4; + return values; + })(); + + v1.DataplexService = (function() { + + /** + * Constructs a new DataplexService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataplexService + * @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 DataplexService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; + + /** + * Creates new DataplexService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataplexService + * @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 {DataplexService} RPC service. Useful where requests and/or responses are streamed. + */ + DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { + return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLake" }); + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { + return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateLake" }); + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { + return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLake" }); + + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + */ + + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { + return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); + }, "name", { value: "ListLakes" }); + + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Lake} [response] Lake + */ + + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { + return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); + }, "name", { value: "GetLake" }); + + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakeActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { + return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListLakeActions" }); + + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { + return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateZone" }); + + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { + return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateZone" }); + + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { + return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteZone" }); + + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZonesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse + */ + + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { + return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); + }, "name", { value: "ListZones" }); + + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Zone} [response] Zone + */ + + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { + return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); + }, "name", { value: "GetZone" }); + + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZoneActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { + return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListZoneActions" }); + + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { + return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAsset" }); + + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { + return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAsset" }); + + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { + return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAsset" }); + + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + */ + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Asset} [response] Asset + */ + + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { + return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); + }, "name", { value: "GetAsset" }); + + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { + return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListAssetActions" }); + + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { + return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTask" }); + + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { + return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTask" }); + + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { + return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTask" }); + + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse + */ + + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { + return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); + }, "name", { value: "ListTasks" }); + + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Task} [response] Task + */ + + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { + return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); + }, "name", { value: "GetTask" }); + + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + */ + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Job} [response] Job + */ + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); + }, "name", { value: "GetJob" }); + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CancelJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { + return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelJob" }); + + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataplexService; + })(); + + v1.CreateLakeRequest = (function() { + + /** + * Properties of a CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateLakeRequest + * @property {string|null} [parent] CreateLakeRequest parent + * @property {string|null} [lakeId] CreateLakeRequest lakeId + * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake + * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + */ + + /** + * Constructs a new CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateLakeRequest. + * @implements ICreateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + */ + function CreateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateLakeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.parent = ""; + + /** + * CreateLakeRequest lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lakeId = ""; + + /** + * CreateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lake = null; + + /** + * CreateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance + */ + CreateLakeRequest.create = function create(properties) { + return new CreateLakeRequest(properties); + }; + + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.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.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.lakeId = reader.string(); + break; + case 3: + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLakeRequest.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.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + */ + CreateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.lakeId = ""; + object.lake = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateLakeRequest; + })(); + + v1.UpdateLakeRequest = (function() { + + /** + * Properties of an UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateLakeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask + * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake + * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly + */ + + /** + * Constructs a new UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateLakeRequest. + * @implements IUpdateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + */ + function UpdateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateLakeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.updateMask = null; + + /** + * UpdateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.lake = null; + + /** + * UpdateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance + */ + UpdateLakeRequest.create = function create(properties) { + return new UpdateLakeRequest(properties); + }; + + /** + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.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.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + 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.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLakeRequest.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.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + */ + UpdateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.lake = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateLakeRequest; + })(); + + v1.DeleteLakeRequest = (function() { + + /** + * Properties of a DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteLakeRequest + * @property {string|null} [name] DeleteLakeRequest name + */ + + /** + * Constructs a new DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteLakeRequest. + * @implements IDeleteLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + */ + function DeleteLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + */ + DeleteLakeRequest.prototype.name = ""; + + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance + */ + DeleteLakeRequest.create = function create(properties) { + return new DeleteLakeRequest(properties); + }; + + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.encode = function encode(message, writer) { + 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 DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + 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 DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLakeRequest.verify = function verify(message) { + if (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 DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + */ + DeleteLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLakeRequest.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 DeleteLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteLakeRequest; + })(); + + v1.ListLakesRequest = (function() { + + /** + * Properties of a ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesRequest + * @property {string|null} [parent] ListLakesRequest parent + * @property {number|null} [pageSize] ListLakesRequest pageSize + * @property {string|null} [pageToken] ListLakesRequest pageToken + * @property {string|null} [filter] ListLakesRequest filter + * @property {string|null} [orderBy] ListLakesRequest orderBy + */ + + /** + * Constructs a new ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesRequest. + * @implements IListLakesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + */ + function ListLakesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.parent = ""; + + /** + * ListLakesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageSize = 0; + + /** + * ListLakesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageToken = ""; + + /** + * ListLakesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.filter = ""; + + /** + * ListLakesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListLakesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance + */ + ListLakesRequest.create = function create(properties) { + return new ListLakesRequest(properties); + }; + + /** + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesRequest.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 ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + 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 ListLakesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakesRequest.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 ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + */ + ListLakesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + 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 ListLakesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakesRequest.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 ListLakesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + * @returns {Object.} JSON object + */ + ListLakesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLakesRequest; + })(); + + v1.ListLakesResponse = (function() { + + /** + * Properties of a ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesResponse + * @property {Array.|null} [lakes] ListLakesResponse lakes + * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations + */ + + /** + * Constructs a new ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesResponse. + * @implements IListLakesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + */ + function ListLakesResponse(properties) { + this.lakes = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakesResponse lakes. + * @member {Array.} lakes + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.lakes = $util.emptyArray; + + /** + * ListLakesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.nextPageToken = ""; + + /** + * ListLakesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance + */ + ListLakesResponse.create = function create(properties) { + return new ListLakesResponse(properties); + }; + + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lakes != null && message.lakes.length) + for (var i = 0; i < message.lakes.length; ++i) + $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[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.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.lakes && message.lakes.length)) + message.lakes = []; + message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lakes != null && message.hasOwnProperty("lakes")) { + if (!Array.isArray(message.lakes)) + return "lakes: array expected"; + for (var i = 0; i < message.lakes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); + if (error) + return "lakes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + */ + ListLakesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + if (object.lakes) { + if (!Array.isArray(object.lakes)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); + message.lakes = []; + for (var i = 0; i < object.lakes.length; ++i) { + if (typeof object.lakes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); + message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.lakes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.lakes && message.lakes.length) { + object.lakes = []; + for (var j = 0; j < message.lakes.length; ++j) + object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListLakesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + * @returns {Object.} JSON object + */ + ListLakesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLakesResponse; + })(); + + v1.ListLakeActionsRequest = (function() { + + /** + * Properties of a ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakeActionsRequest + * @property {string|null} [parent] ListLakeActionsRequest parent + * @property {number|null} [pageSize] ListLakeActionsRequest pageSize + * @property {string|null} [pageToken] ListLakeActionsRequest pageToken + */ + + /** + * Constructs a new ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakeActionsRequest. + * @implements IListLakeActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + */ + function ListLakeActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakeActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.parent = ""; + + /** + * ListLakeActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.pageSize = 0; + + /** + * ListLakeActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance + */ + ListLakeActionsRequest.create = function create(properties) { + return new ListLakeActionsRequest(properties); + }; + + /** + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakeActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakeActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakeActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakeActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + */ + ListLakeActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakeActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListLakeActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLakeActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLakeActionsRequest; + })(); + + v1.ListActionsResponse = (function() { + + /** + * Properties of a ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListActionsResponse + * @property {Array.|null} [actions] ListActionsResponse actions + * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken + */ + + /** + * Constructs a new ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListActionsResponse. + * @implements IListActionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + */ + function ListActionsResponse(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListActionsResponse actions. + * @member {Array.} actions + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + */ + ListActionsResponse.prototype.actions = $util.emptyArray; + + /** + * ListActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + */ + ListActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance + */ + ListActionsResponse.create = function create(properties) { + return new ListActionsResponse(properties); + }; + + /** + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.cloud.dataplex.v1.Action.encode(message.actions[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 ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListActionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + */ + ListActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); + message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListActionsResponse; + })(); + + v1.GetLakeRequest = (function() { + + /** + * Properties of a GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetLakeRequest + * @property {string|null} [name] GetLakeRequest name + */ + + /** + * Constructs a new GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetLakeRequest. + * @implements IGetLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + */ + function GetLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @instance + */ + GetLakeRequest.prototype.name = ""; + + /** + * Creates a new GetLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance + */ + GetLakeRequest.create = function create(properties) { + return new GetLakeRequest(properties); + }; + + /** + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLakeRequest.encode = function encode(message, writer) { + 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 GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + 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 GetLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLakeRequest.verify = function verify(message) { + if (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 GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + */ + GetLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLakeRequest.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 GetLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @instance + * @returns {Object.} JSON object + */ + GetLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLakeRequest; + })(); + + v1.CreateZoneRequest = (function() { + + /** + * Properties of a CreateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateZoneRequest + * @property {string|null} [parent] CreateZoneRequest parent + * @property {string|null} [zoneId] CreateZoneRequest zoneId + * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone + * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly + */ + + /** + * Constructs a new CreateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateZoneRequest. + * @implements ICreateZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + */ + function CreateZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateZoneRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.parent = ""; + + /** + * CreateZoneRequest zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.zoneId = ""; + + /** + * CreateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.zone = null; + + /** + * CreateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance + */ + CreateZoneRequest.create = function create(properties) { + return new CreateZoneRequest(properties); + }; + + /** + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateZoneRequest.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.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.zoneId = reader.string(); + break; + case 3: + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateZoneRequest.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.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + */ + CreateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.zoneId = ""; + object.zone = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + * @returns {Object.} JSON object + */ + CreateZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateZoneRequest; + })(); + + v1.UpdateZoneRequest = (function() { + + /** + * Properties of an UpdateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateZoneRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask + * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone + * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly + */ + + /** + * Constructs a new UpdateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateZoneRequest. + * @implements IUpdateZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + */ + function UpdateZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateZoneRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.updateMask = null; + + /** + * UpdateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.zone = null; + + /** + * UpdateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance + */ + UpdateZoneRequest.create = function create(properties) { + return new UpdateZoneRequest(properties); + }; + + /** + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateZoneRequest.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.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + 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.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateZoneRequest.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.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + */ + UpdateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.zone = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateZoneRequest; + })(); + + v1.DeleteZoneRequest = (function() { + + /** + * Properties of a DeleteZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteZoneRequest + * @property {string|null} [name] DeleteZoneRequest name + */ + + /** + * Constructs a new DeleteZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteZoneRequest. + * @implements IDeleteZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + */ + function DeleteZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @instance + */ + DeleteZoneRequest.prototype.name = ""; + + /** + * Creates a new DeleteZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance + */ + DeleteZoneRequest.create = function create(properties) { + return new DeleteZoneRequest(properties); + }; + + /** + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteZoneRequest.encode = function encode(message, writer) { + 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 DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + 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 DeleteZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteZoneRequest.verify = function verify(message) { + if (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 DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + */ + DeleteZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteZoneRequest.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 DeleteZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteZoneRequest; + })(); + + v1.ListZonesRequest = (function() { + + /** + * Properties of a ListZonesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListZonesRequest + * @property {string|null} [parent] ListZonesRequest parent + * @property {number|null} [pageSize] ListZonesRequest pageSize + * @property {string|null} [pageToken] ListZonesRequest pageToken + * @property {string|null} [filter] ListZonesRequest filter + * @property {string|null} [orderBy] ListZonesRequest orderBy + */ + + /** + * Constructs a new ListZonesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZonesRequest. + * @implements IListZonesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + */ + function ListZonesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZonesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.parent = ""; + + /** + * ListZonesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.pageSize = 0; + + /** + * ListZonesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.pageToken = ""; + + /** + * ListZonesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.filter = ""; + + /** + * ListZonesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListZonesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance + */ + ListZonesRequest.create = function create(properties) { + return new ListZonesRequest(properties); + }; + + /** + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesRequest.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 ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + 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 ListZonesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZonesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZonesRequest.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 ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + */ + ListZonesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + 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 ListZonesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZonesRequest.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 ListZonesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + * @returns {Object.} JSON object + */ + ListZonesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListZonesRequest; + })(); + + v1.ListZonesResponse = (function() { + + /** + * Properties of a ListZonesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListZonesResponse + * @property {Array.|null} [zones] ListZonesResponse zones + * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken + */ + + /** + * Constructs a new ListZonesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZonesResponse. + * @implements IListZonesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + */ + function ListZonesResponse(properties) { + this.zones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZonesResponse zones. + * @member {Array.} zones + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + */ + ListZonesResponse.prototype.zones = $util.emptyArray; + + /** + * ListZonesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + */ + ListZonesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListZonesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance + */ + ListZonesResponse.create = function create(properties) { + return new ListZonesResponse(properties); + }; + + /** + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + $root.google.cloud.dataplex.v1.Zone.encode(message.zones[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 ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZonesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZonesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); + if (error) + return "zones." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + */ + ListZonesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) { + if (typeof object.zones[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); + message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZonesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.zones = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListZonesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + * @returns {Object.} JSON object + */ + ListZonesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListZonesResponse; + })(); + + v1.ListZoneActionsRequest = (function() { + + /** + * Properties of a ListZoneActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListZoneActionsRequest + * @property {string|null} [parent] ListZoneActionsRequest parent + * @property {number|null} [pageSize] ListZoneActionsRequest pageSize + * @property {string|null} [pageToken] ListZoneActionsRequest pageToken + */ + + /** + * Constructs a new ListZoneActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZoneActionsRequest. + * @implements IListZoneActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + */ + function ListZoneActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZoneActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.parent = ""; + + /** + * ListZoneActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.pageSize = 0; + + /** + * ListZoneActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListZoneActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance + */ + ListZoneActionsRequest.create = function create(properties) { + return new ListZoneActionsRequest(properties); + }; + + /** + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZoneActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZoneActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZoneActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZoneActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + */ + ListZoneActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZoneActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListZoneActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListZoneActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListZoneActionsRequest; + })(); + + v1.GetZoneRequest = (function() { + + /** + * Properties of a GetZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetZoneRequest + * @property {string|null} [name] GetZoneRequest name + */ + + /** + * Constructs a new GetZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetZoneRequest. + * @implements IGetZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + */ + function GetZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @instance + */ + GetZoneRequest.prototype.name = ""; + + /** + * Creates a new GetZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance + */ + GetZoneRequest.create = function create(properties) { + return new GetZoneRequest(properties); + }; + + /** + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetZoneRequest.encode = function encode(message, writer) { + 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 GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + 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 GetZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetZoneRequest.verify = function verify(message) { + if (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 GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + */ + GetZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetZoneRequest.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 GetZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @instance + * @returns {Object.} JSON object + */ + GetZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetZoneRequest; + })(); + + v1.CreateAssetRequest = (function() { + + /** + * Properties of a CreateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateAssetRequest + * @property {string|null} [parent] CreateAssetRequest parent + * @property {string|null} [assetId] CreateAssetRequest assetId + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset + * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly + */ + + /** + * Constructs a new CreateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateAssetRequest. + * @implements ICreateAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + */ + function CreateAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAssetRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.parent = ""; + + /** + * CreateAssetRequest assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.assetId = ""; + + /** + * CreateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.asset = null; + + /** + * CreateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance + */ + CreateAssetRequest.create = function create(properties) { + return new CreateAssetRequest(properties); + }; + + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.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.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.assetId = reader.string(); + break; + case 3: + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAssetRequest.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.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + */ + CreateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.assetId = ""; + object.asset = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateAssetRequest; + })(); + + v1.UpdateAssetRequest = (function() { + + /** + * Properties of an UpdateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateAssetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset + * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly + */ + + /** + * Constructs a new UpdateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateAssetRequest. + * @implements IUpdateAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + */ + function UpdateAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAssetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.updateMask = null; + + /** + * UpdateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.asset = null; + + /** + * UpdateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance + */ + UpdateAssetRequest.create = function create(properties) { + return new UpdateAssetRequest(properties); + }; + + /** + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAssetRequest.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.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + 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.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAssetRequest.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.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + */ + UpdateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.asset = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateAssetRequest; + })(); + + v1.DeleteAssetRequest = (function() { + + /** + * Properties of a DeleteAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteAssetRequest + * @property {string|null} [name] DeleteAssetRequest name + */ + + /** + * Constructs a new DeleteAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteAssetRequest. + * @implements IDeleteAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + */ + function DeleteAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @instance + */ + DeleteAssetRequest.prototype.name = ""; + + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance + */ + DeleteAssetRequest.create = function create(properties) { + return new DeleteAssetRequest(properties); + }; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encode = function encode(message, writer) { + 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 DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + 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 DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAssetRequest.verify = function verify(message) { + if (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 DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + */ + DeleteAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAssetRequest.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 DeleteAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteAssetRequest; + })(); + + v1.ListAssetsRequest = (function() { + + /** + * Properties of a ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + */ + + /** + * Constructs a new ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + */ + function ListAssetsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.parent = ""; + + /** + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; + + /** + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; + + /** + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.filter = ""; + + /** + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance + */ + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); + }; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.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 ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + 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 ListAssetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsRequest.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 ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + */ + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + 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 ListAssetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsRequest.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 ListAssetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAssetsRequest; + })(); + + v1.ListAssetsResponse = (function() { + + /** + * Properties of a ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsResponse + * @property {Array.|null} [assets] ListAssetsResponse assets + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + */ + + /** + * Constructs a new ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + */ + function ListAssetsResponse(properties) { + this.assets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetsResponse assets. + * @member {Array.} assets + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.assets = $util.emptyArray; + + /** + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance + */ + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); + }; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.dataplex.v1.Asset.encode(message.assets[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 ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); + if (error) + return "assets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + */ + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.assets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAssetsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAssetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAssetsResponse; + })(); + + v1.ListAssetActionsRequest = (function() { + + /** + * Properties of a ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetActionsRequest + * @property {string|null} [parent] ListAssetActionsRequest parent + * @property {number|null} [pageSize] ListAssetActionsRequest pageSize + * @property {string|null} [pageToken] ListAssetActionsRequest pageToken + */ + + /** + * Constructs a new ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetActionsRequest. + * @implements IListAssetActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + */ + function ListAssetActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.parent = ""; + + /** + * ListAssetActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageSize = 0; + + /** + * ListAssetActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance + */ + ListAssetActionsRequest.create = function create(properties) { + return new ListAssetActionsRequest(properties); + }; + + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + */ + ListAssetActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListAssetActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAssetActionsRequest; + })(); + + v1.GetAssetRequest = (function() { + + /** + * Properties of a GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetAssetRequest + * @property {string|null} [name] GetAssetRequest name + */ + + /** + * Constructs a new GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetAssetRequest. + * @implements IGetAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + */ + function GetAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @instance + */ + GetAssetRequest.prototype.name = ""; + + /** + * Creates a new GetAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance + */ + GetAssetRequest.create = function create(properties) { + return new GetAssetRequest(properties); + }; + + /** + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.encode = function encode(message, writer) { + 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 GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + 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 GetAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAssetRequest.verify = function verify(message) { + if (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 GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + */ + GetAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAssetRequest.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 GetAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @instance + * @returns {Object.} JSON object + */ + GetAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetAssetRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.dataplex.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.dataplex.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.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.dataplex.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.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.dataplex.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.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.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.dataplex.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationMetadata; + })(); + + v1.CreateTaskRequest = (function() { + + /** + * Properties of a CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateTaskRequest + * @property {string|null} [parent] CreateTaskRequest parent + * @property {string|null} [taskId] CreateTaskRequest taskId + * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task + * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly + */ + + /** + * Constructs a new CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateTaskRequest. + * @implements ICreateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + */ + function CreateTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTaskRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.parent = ""; + + /** + * CreateTaskRequest taskId. + * @member {string} taskId + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.taskId = ""; + + /** + * CreateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.task = null; + + /** + * CreateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance + */ + CreateTaskRequest.create = function create(properties) { + return new CreateTaskRequest(properties); + }; + + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.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.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.taskId = reader.string(); + break; + case 3: + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTaskRequest.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.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + */ + CreateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.taskId = ""; + object.task = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTaskRequest; + })(); + + v1.UpdateTaskRequest = (function() { + + /** + * Properties of an UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateTaskRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask + * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task + * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly + */ + + /** + * Constructs a new UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateTaskRequest. + * @implements IUpdateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + */ + function UpdateTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTaskRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.updateMask = null; + + /** + * UpdateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.task = null; + + /** + * UpdateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance + */ + UpdateTaskRequest.create = function create(properties) { + return new UpdateTaskRequest(properties); + }; + + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.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.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + 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.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTaskRequest.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.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + */ + UpdateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.task = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateTaskRequest; + })(); + + v1.DeleteTaskRequest = (function() { + + /** + * Properties of a DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteTaskRequest + * @property {string|null} [name] DeleteTaskRequest name + */ + + /** + * Constructs a new DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteTaskRequest. + * @implements IDeleteTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + */ + function DeleteTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + */ + DeleteTaskRequest.prototype.name = ""; + + /** + * Creates a new DeleteTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance + */ + DeleteTaskRequest.create = function create(properties) { + return new DeleteTaskRequest(properties); + }; + + /** + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.encode = function encode(message, writer) { + 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 DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + 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 DeleteTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTaskRequest.verify = function verify(message) { + if (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 DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + */ + DeleteTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTaskRequest.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 DeleteTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteTaskRequest; + })(); + + v1.ListTasksRequest = (function() { + + /** + * Properties of a ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksRequest + * @property {string|null} [parent] ListTasksRequest parent + * @property {number|null} [pageSize] ListTasksRequest pageSize + * @property {string|null} [pageToken] ListTasksRequest pageToken + * @property {string|null} [filter] ListTasksRequest filter + * @property {string|null} [orderBy] ListTasksRequest orderBy + */ + + /** + * Constructs a new ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksRequest. + * @implements IListTasksRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + */ + function ListTasksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTasksRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.parent = ""; + + /** + * ListTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageSize = 0; + + /** + * ListTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageToken = ""; + + /** + * ListTasksRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.filter = ""; + + /** + * ListTasksRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.orderBy = ""; + + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance + */ + ListTasksRequest.create = function create(properties) { + return new ListTasksRequest(properties); + }; + + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.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 ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + 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 ListTasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTasksRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksRequest.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 ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + */ + ListTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + 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 ListTasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksRequest.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 ListTasksRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListTasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTasksRequest; + })(); + + v1.ListTasksResponse = (function() { + + /** + * Properties of a ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksResponse + * @property {Array.|null} [tasks] ListTasksResponse tasks + * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations + */ + + /** + * Constructs a new ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksResponse. + * @implements IListTasksResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + */ + function ListTasksResponse(properties) { + this.tasks = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTasksResponse tasks. + * @member {Array.} tasks + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.tasks = $util.emptyArray; + + /** + * ListTasksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.nextPageToken = ""; + + /** + * ListTasksResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListTasksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance + */ + ListTasksResponse.create = function create(properties) { + return new ListTasksResponse(properties); + }; + + /** + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tasks != null && message.tasks.length) + for (var i = 0; i < message.tasks.length; ++i) + $root.google.cloud.dataplex.v1.Task.encode(message.tasks[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.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tasks && message.tasks.length)) + message.tasks = []; + message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTasksResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!Array.isArray(message.tasks)) + return "tasks: array expected"; + for (var i = 0; i < message.tasks.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); + if (error) + return "tasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + */ + ListTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + if (object.tasks) { + if (!Array.isArray(object.tasks)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); + message.tasks = []; + for (var i = 0; i < object.tasks.length; ++i) { + if (typeof object.tasks[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); + message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tasks = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.tasks && message.tasks.length) { + object.tasks = []; + for (var j = 0; j < message.tasks.length; ++j) + object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListTasksResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListTasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTasksResponse; + })(); + + v1.GetTaskRequest = (function() { + + /** + * Properties of a GetTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetTaskRequest + * @property {string|null} [name] GetTaskRequest name + */ + + /** + * Constructs a new GetTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetTaskRequest. + * @implements IGetTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + */ + function GetTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @instance + */ + GetTaskRequest.prototype.name = ""; + + /** + * Creates a new GetTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance + */ + GetTaskRequest.create = function create(properties) { + return new GetTaskRequest(properties); + }; + + /** + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskRequest.encode = function encode(message, writer) { + 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 GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + 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 GetTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTaskRequest.verify = function verify(message) { + if (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 GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + */ + GetTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTaskRequest.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 GetTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTaskRequest; + })(); + + v1.GetJobRequest = (function() { + + /** + * Properties of a GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name + */ + + /** + * Constructs a new GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + */ + function GetJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @instance + */ + GetJobRequest.prototype.name = ""; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance + */ + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); + }; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encode = function encode(message, writer) { + 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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + 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 GetJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobRequest.verify = function verify(message) { + if (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 GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + */ + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobRequest.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 GetJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetJobRequest; + })(); + + v1.ListJobsRequest = (function() { + + /** + * Properties of a ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken + */ + + /** + * Constructs a new ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + */ + function ListJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.parent = ""; + + /** + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageSize = 0; + + /** + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance + */ + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); + }; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + */ + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsRequest; + })(); + + v1.ListJobsResponse = (function() { + + /** + * Properties of a ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + */ + + /** + * Constructs a new ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + */ + function ListJobsResponse(properties) { + this.jobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.jobs = $util.emptyArray; + + /** + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance + */ + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); + }; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.dataplex.v1.Job.encode(message.jobs[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 ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + */ + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsResponse; + })(); + + v1.CancelJobRequest = (function() { + + /** + * Properties of a CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICancelJobRequest + * @property {string|null} [name] CancelJobRequest name + */ + + /** + * Constructs a new CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CancelJobRequest. + * @implements ICancelJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + */ + function CancelJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @instance + */ + CancelJobRequest.prototype.name = ""; + + /** + * Creates a new CancelJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance + */ + CancelJobRequest.create = function create(properties) { + return new CancelJobRequest(properties); + }; + + /** + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encode = function encode(message, writer) { + 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 CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + 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 CancelJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelJobRequest.verify = function verify(message) { + if (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 CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + */ + CancelJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelJobRequest.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 CancelJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @instance + * @returns {Object.} JSON object + */ + CancelJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelJobRequest; + })(); + + v1.Task = (function() { + + /** + * Properties of a Task. + * @memberof google.cloud.dataplex.v1 + * @interface ITask + * @property {string|null} [name] Task name + * @property {string|null} [uid] Task uid + * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime + * @property {string|null} [description] Task description + * @property {string|null} [displayName] Task displayName + * @property {google.cloud.dataplex.v1.State|null} [state] Task state + * @property {Object.|null} [labels] Task labels + * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec + * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark + */ + + /** + * Constructs a new Task. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Task. + * @implements ITask + * @constructor + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + */ + function Task(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]]; + } + + /** + * Task name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.name = ""; + + /** + * Task uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.uid = ""; + + /** + * Task createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.createTime = null; + + /** + * Task updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.updateTime = null; + + /** + * Task description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.description = ""; + + /** + * Task displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.displayName = ""; + + /** + * Task state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.state = 0; + + /** + * Task labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.labels = $util.emptyObject; + + /** + * Task triggerSpec. + * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.triggerSpec = null; + + /** + * Task executionSpec. + * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionSpec = null; + + /** + * Task spark. + * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.spark = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Task config. + * @member {"spark"|undefined} config + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Object.defineProperty(Task.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["spark"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Task instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task} Task instance + */ + Task.create = function create(properties) { + return new Task(properties); + }; + + /** + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encode = function encode(message, writer) { + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + 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 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) + $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) + $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Task message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.uid = reader.string(); + break; + case 3: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.description = reader.string(); + break; + case 6: + message.displayName = reader.string(); + break; + case 7: + message.state = reader.int32(); + break; + case 8: + 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 100: + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); + break; + case 101: + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + case 300: + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Task message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Task.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.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.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); + if (error) + return "triggerSpec." + error; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + if (message.spark != null && message.hasOwnProperty("spark")) { + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); + if (error) + return "spark." + error; + } + } + return null; + }; + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task} Task + */ + Task.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task) + return object; + var message = new $root.google.cloud.dataplex.v1.Task(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.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.triggerSpec != null) { + if (typeof object.triggerSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + } + if (object.spark != null) { + if (typeof object.spark !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); + } + return message; + }; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.Task} message Task + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Task.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.triggerSpec = null; + object.executionSpec = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; + 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.triggerSpec != null && message.hasOwnProperty("triggerSpec")) + object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + if (message.spark != null && message.hasOwnProperty("spark")) { + object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); + if (options.oneofs) + object.config = "spark"; + } + return object; + }; + + /** + * Converts this Task to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task + * @instance + * @returns {Object.} JSON object + */ + Task.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Task.InfrastructureSpec = (function() { + + /** + * Properties of an InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IInfrastructureSpec + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork + */ + + /** + * Constructs a new InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an InfrastructureSpec. + * @implements IInfrastructureSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + */ + function InfrastructureSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfrastructureSpec batch. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.batch = null; + + /** + * InfrastructureSpec containerImage. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.containerImage = null; + + /** + * InfrastructureSpec vpcNetwork. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.vpcNetwork = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InfrastructureSpec resources. + * @member {"batch"|undefined} resources + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "resources", { + get: $util.oneOfGetter($oneOfFields = ["batch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec runtime. + * @member {"containerImage"|undefined} runtime + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "runtime", { + get: $util.oneOfGetter($oneOfFields = ["containerImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec network. + * @member {"vpcNetwork"|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "network", { + get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance + */ + InfrastructureSpec.create = function create(properties) { + return new InfrastructureSpec(properties); + }; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 52: + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); + break; + case 101: + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); + break; + case 150: + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfrastructureSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfrastructureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + properties.resources = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); + if (error) + return "batch." + error; + } + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + properties.runtime = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); + if (error) + return "containerImage." + error; + } + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + properties.network = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); + if (error) + return "vpcNetwork." + error; + } + } + return null; + }; + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + */ + InfrastructureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + if (object.batch != null) { + if (typeof object.batch !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); + } + if (object.containerImage != null) { + if (typeof object.containerImage !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); + } + if (object.vpcNetwork != null) { + if (typeof object.vpcNetwork !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); + } + return message; + }; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfrastructureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); + if (options.oneofs) + object.resources = "batch"; + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); + if (options.oneofs) + object.runtime = "containerImage"; + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); + if (options.oneofs) + object.network = "vpcNetwork"; + } + return object; + }; + + /** + * Converts this InfrastructureSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + * @returns {Object.} JSON object + */ + InfrastructureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + InfrastructureSpec.BatchComputeResources = (function() { + + /** + * Properties of a BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IBatchComputeResources + * @property {number|null} [executorsCount] BatchComputeResources executorsCount + * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount + */ + + /** + * Constructs a new BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a BatchComputeResources. + * @implements IBatchComputeResources + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + */ + function BatchComputeResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchComputeResources executorsCount. + * @member {number} executorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.executorsCount = 0; + + /** + * BatchComputeResources maxExecutorsCount. + * @member {number} maxExecutorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.maxExecutorsCount = 0; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance + */ + BatchComputeResources.create = function create(properties) { + return new BatchComputeResources(properties); + }; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); + if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); + return writer; + }; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.executorsCount = reader.int32(); + break; + case 2: + message.maxExecutorsCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchComputeResources message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchComputeResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + if (!$util.isInteger(message.executorsCount)) + return "executorsCount: integer expected"; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + if (!$util.isInteger(message.maxExecutorsCount)) + return "maxExecutorsCount: integer expected"; + return null; + }; + + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + */ + BatchComputeResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + if (object.executorsCount != null) + message.executorsCount = object.executorsCount | 0; + if (object.maxExecutorsCount != null) + message.maxExecutorsCount = object.maxExecutorsCount | 0; + return message; + }; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchComputeResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.executorsCount = 0; + object.maxExecutorsCount = 0; + } + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + object.executorsCount = message.executorsCount; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + object.maxExecutorsCount = message.maxExecutorsCount; + return object; + }; + + /** + * Converts this BatchComputeResources to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + * @returns {Object.} JSON object + */ + BatchComputeResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BatchComputeResources; + })(); + + InfrastructureSpec.ContainerImageRuntime = (function() { + + /** + * Properties of a ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IContainerImageRuntime + * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars + * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages + * @property {Object.|null} [properties] ContainerImageRuntime properties + */ + + /** + * Constructs a new ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a ContainerImageRuntime. + * @implements IContainerImageRuntime + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + */ + function ContainerImageRuntime(properties) { + this.javaJars = []; + this.pythonPackages = []; + this.properties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContainerImageRuntime javaJars. + * @member {Array.} javaJars + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.javaJars = $util.emptyArray; + + /** + * ContainerImageRuntime pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; + + /** + * ContainerImageRuntime properties. + * @member {Object.} properties + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.properties = $util.emptyObject; + + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance + */ + ContainerImageRuntime.create = function create(properties) { + return new ContainerImageRuntime(properties); + }; + + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaJars != null && message.javaJars.length) + for (var i = 0; i < message.javaJars.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.javaJars && message.javaJars.length)) + message.javaJars = []; + message.javaJars.push(reader.string()); + break; + case 3: + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + case 4: + if (message.properties === $util.emptyObject) + message.properties = {}; + 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.properties[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContainerImageRuntime message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContainerImageRuntime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaJars != null && message.hasOwnProperty("javaJars")) { + if (!Array.isArray(message.javaJars)) + return "javaJars: array expected"; + for (var i = 0; i < message.javaJars.length; ++i) + if (!$util.isString(message.javaJars[i])) + return "javaJars: string[] expected"; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) + if (!$util.isString(message.pythonPackages[i])) + return "pythonPackages: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + */ + ContainerImageRuntime.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); + if (object.javaJars) { + if (!Array.isArray(object.javaJars)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); + message.javaJars = []; + for (var i = 0; i < object.javaJars.length; ++i) + message.javaJars[i] = String(object.javaJars[i]); + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) + message.pythonPackages[i] = String(object.pythonPackages[i]); + } + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContainerImageRuntime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.javaJars = []; + object.pythonPackages = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (message.javaJars && message.javaJars.length) { + object.javaJars = []; + for (var j = 0; j < message.javaJars.length; ++j) + object.javaJars[j] = message.javaJars[j]; + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = message.pythonPackages[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + return object; + }; + + /** + * Converts this ContainerImageRuntime to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + * @returns {Object.} JSON object + */ + ContainerImageRuntime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContainerImageRuntime; + })(); + + InfrastructureSpec.VpcNetwork = (function() { + + /** + * Properties of a VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IVpcNetwork + * @property {string|null} [network] VpcNetwork network + * @property {string|null} [subNetwork] VpcNetwork subNetwork + * @property {Array.|null} [networkTags] VpcNetwork networkTags + */ + + /** + * Constructs a new VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a VpcNetwork. + * @implements IVpcNetwork + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + */ + function VpcNetwork(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcNetwork network. + * @member {string|null|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.network = null; + + /** + * VpcNetwork subNetwork. + * @member {string|null|undefined} subNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.subNetwork = null; + + /** + * VpcNetwork networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.networkTags = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VpcNetwork networkName. + * @member {"network"|"subNetwork"|undefined} networkName + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + Object.defineProperty(VpcNetwork.prototype, "networkName", { + get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VpcNetwork instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance + */ + VpcNetwork.create = function create(properties) { + return new VpcNetwork(properties); + }; + + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); + return writer; + }; + + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.network = reader.string(); + break; + case 2: + message.subNetwork = reader.string(); + break; + case 3: + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcNetwork message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcNetwork.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties.networkName = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + if (properties.networkName === 1) + return "networkName: multiple values"; + properties.networkName = 1; + if (!$util.isString(message.subNetwork)) + return "subNetwork: string expected"; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + return null; + }; + + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + */ + VpcNetwork.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + if (object.network != null) + message.network = String(object.network); + if (object.subNetwork != null) + message.subNetwork = String(object.subNetwork); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcNetwork.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object.networkName = "network"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + object.subNetwork = message.subNetwork; + if (options.oneofs) + object.networkName = "subNetwork"; + } + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + return object; + }; + + /** + * Converts this VpcNetwork to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + * @returns {Object.} JSON object + */ + VpcNetwork.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VpcNetwork; + })(); + + return InfrastructureSpec; + })(); + + Task.TriggerSpec = (function() { + + /** + * Properties of a TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface ITriggerSpec + * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type + * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime + * @property {boolean|null} [disabled] TriggerSpec disabled + * @property {number|null} [maxRetries] TriggerSpec maxRetries + * @property {string|null} [schedule] TriggerSpec schedule + */ + + /** + * Constructs a new TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a TriggerSpec. + * @implements ITriggerSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + */ + function TriggerSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerSpec type. + * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.type = 0; + + /** + * TriggerSpec startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.startTime = null; + + /** + * TriggerSpec disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.disabled = false; + + /** + * TriggerSpec maxRetries. + * @member {number} maxRetries + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.maxRetries = 0; + + /** + * TriggerSpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TriggerSpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + Object.defineProperty(TriggerSpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TriggerSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance + */ + TriggerSpec.create = function create(properties) { + return new TriggerSpec(properties); + }; + + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.type = reader.int32(); + break; + case 6: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.disabled = reader.bool(); + break; + case 7: + message.maxRetries = reader.int32(); + break; + case 100: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + if (!$util.isInteger(message.maxRetries)) + return "maxRetries: integer expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + */ + TriggerSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ON_DEMAND": + case 1: + message.type = 1; + break; + case "RECURRING": + case 2: + message.type = 2; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.maxRetries != null) + message.maxRetries = object.maxRetries | 0; + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.startTime = null; + object.maxRetries = 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + object.maxRetries = message.maxRetries; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this TriggerSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + * @returns {Object.} JSON object + */ + TriggerSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} RECURRING=2 RECURRING value + */ + TriggerSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "RECURRING"] = 2; + return values; + })(); + + return TriggerSpec; + })(); + + Task.ExecutionSpec = (function() { + + /** + * Properties of an ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionSpec + * @property {Object.|null} [args] ExecutionSpec args + * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount + * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime + */ + + /** + * Constructs a new ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionSpec. + * @implements IExecutionSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + */ + function ExecutionSpec(properties) { + this.args = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionSpec args. + * @member {Object.} args + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.args = $util.emptyObject; + + /** + * ExecutionSpec serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.serviceAccount = ""; + + /** + * ExecutionSpec maxJobExecutionLifetime. + * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.maxJobExecutionLifetime = null; + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance + */ + ExecutionSpec.create = function create(properties) { + return new ExecutionSpec(properties); + }; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.args != null && Object.hasOwnProperty.call(message, "args")) + for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) + $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + if (message.args === $util.emptyObject) + message.args = {}; + 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.args[key] = value; + break; + case 5: + message.serviceAccount = reader.string(); + break; + case 8: + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.args != null && message.hasOwnProperty("args")) { + if (!$util.isObject(message.args)) + return "args: object expected"; + var key = Object.keys(message.args); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.args[key[i]])) + return "args: string{k:string} expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { + var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); + if (error) + return "maxJobExecutionLifetime." + error; + } + return null; + }; + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + */ + ExecutionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); + if (object.args) { + if (typeof object.args !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); + message.args = {}; + for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) + message.args[keys[i]] = String(object.args[keys[i]]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.maxJobExecutionLifetime != null) { + if (typeof object.maxJobExecutionLifetime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.args = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.maxJobExecutionLifetime = null; + } + var keys2; + if (message.args && (keys2 = Object.keys(message.args)).length) { + object.args = {}; + for (var j = 0; j < keys2.length; ++j) + object.args[keys2[j]] = message.args[keys2[j]]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) + object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); + return object; + }; + + /** + * Converts this ExecutionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + * @returns {Object.} JSON object + */ + ExecutionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecutionSpec; + })(); + + Task.SparkTaskConfig = (function() { + + /** + * Properties of a SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface ISparkTaskConfig + * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri + * @property {string|null} [mainClass] SparkTaskConfig mainClass + * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile + * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile + * @property {string|null} [sqlScript] SparkTaskConfig sqlScript + * @property {Array.|null} [fileUris] SparkTaskConfig fileUris + * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec + */ + + /** + * Constructs a new SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a SparkTaskConfig. + * @implements ISparkTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + */ + function SparkTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SparkTaskConfig mainJarFileUri. + * @member {string|null|undefined} mainJarFileUri + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainJarFileUri = null; + + /** + * SparkTaskConfig mainClass. + * @member {string|null|undefined} mainClass + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainClass = null; + + /** + * SparkTaskConfig pythonScriptFile. + * @member {string|null|undefined} pythonScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.pythonScriptFile = null; + + /** + * SparkTaskConfig sqlScriptFile. + * @member {string|null|undefined} sqlScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScriptFile = null; + + /** + * SparkTaskConfig sqlScript. + * @member {string|null|undefined} sqlScript + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScript = null; + + /** + * SparkTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.fileUris = $util.emptyArray; + + /** + * SparkTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.archiveUris = $util.emptyArray; + + /** + * SparkTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.infrastructureSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SparkTaskConfig driver. + * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + Object.defineProperty(SparkTaskConfig.prototype, "driver", { + get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance + */ + SparkTaskConfig.create = function create(properties) { + return new SparkTaskConfig(properties); + }; + + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); + if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); + if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); + if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: + message.mainJarFileUri = reader.string(); + break; + case 101: + message.mainClass = reader.string(); + break; + case 102: + message.pythonScriptFile = reader.string(); + break; + case 104: + message.sqlScriptFile = reader.string(); + break; + case 105: + message.sqlScript = reader.string(); + break; + case 3: + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + case 4: + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + case 6: + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + properties.driver = 1; + if (!$util.isString(message.mainJarFileUri)) + return "mainJarFileUri: string expected"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.mainClass)) + return "mainClass: string expected"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.pythonScriptFile)) + return "pythonScriptFile: string expected"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScriptFile)) + return "sqlScriptFile: string expected"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + return null; + }; + + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + */ + SparkTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + if (object.mainJarFileUri != null) + message.mainJarFileUri = String(object.mainJarFileUri); + if (object.mainClass != null) + message.mainClass = String(object.mainClass); + if (object.pythonScriptFile != null) + message.pythonScriptFile = String(object.pythonScriptFile); + if (object.sqlScriptFile != null) + message.sqlScriptFile = String(object.sqlScriptFile); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + return message; + }; + + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) + object.infrastructureSpec = null; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + object.mainJarFileUri = message.mainJarFileUri; + if (options.oneofs) + object.driver = "mainJarFileUri"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + object.mainClass = message.mainClass; + if (options.oneofs) + object.driver = "mainClass"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + object.pythonScriptFile = message.pythonScriptFile; + if (options.oneofs) + object.driver = "pythonScriptFile"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + object.sqlScriptFile = message.sqlScriptFile; + if (options.oneofs) + object.driver = "sqlScriptFile"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + object.sqlScript = message.sqlScript; + if (options.oneofs) + object.driver = "sqlScript"; + } + return object; + }; + + /** + * Converts this SparkTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + * @returns {Object.} JSON object + */ + SparkTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SparkTaskConfig; + })(); + + return Task; + })(); + + v1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.dataplex.v1 + * @interface IJob + * @property {string|null} [name] Job name + * @property {string|null} [uid] Job uid + * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state + * @property {number|null} [retryCount] Job retryCount + * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service + * @property {string|null} [serviceJob] Job serviceJob + * @property {string|null} [message] Job message + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + */ + function Job(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Job name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.name = ""; + + /** + * Job uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.uid = ""; + + /** + * Job startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.startTime = null; + + /** + * Job endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.endTime = null; + + /** + * Job state. + * @member {google.cloud.dataplex.v1.Job.State} state + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job retryCount. + * @member {number} retryCount + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.retryCount = 0; + + /** + * Job service. + * @member {google.cloud.dataplex.v1.Job.Service} service + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.service = 0; + + /** + * Job serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.serviceJob = ""; + + /** + * Job message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.message = ""; + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encode = function encode(message, writer) { + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); + return writer; + }; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.uid = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 6: + message.retryCount = reader.uint32(); + break; + case 7: + message.service = reader.int32(); + break; + case 8: + message.serviceJob = reader.string(); + break; + case 9: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.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.retryCount != null && message.hasOwnProperty("retryCount")) + if (!$util.isInteger(message.retryCount)) + return "retryCount: integer expected"; + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Job) + return object; + var message = new $root.google.cloud.dataplex.v1.Job(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "CANCELLING": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ABORTED": + case 6: + message.state = 6; + break; + } + if (object.retryCount != null) + message.retryCount = object.retryCount >>> 0; + switch (object.service) { + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retryCount = 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + object.message = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + object.retryCount = message.retryCount; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Service enum. + * @name google.cloud.dataplex.v1.Job.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + Job.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.Job.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} ABORTED=6 ABORTED value + */ + Job.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + return values; + })(); + + return Job; + })(); + + return v1; + })(); + + return dataplex; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * 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) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + 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) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + 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[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json new file mode 100644 index 00000000000..341f4fedee7 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -0,0 +1,5112 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "dataplex": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex", + "java_multiple_files": true, + "java_outer_classname": "TasksProto", + "java_package": "com.google.cloud.dataplex.v1" + }, + "nested": { + "DiscoveryEvent": { + "oneofs": { + "details": { + "oneof": [ + "config", + "entity", + "partition", + "action" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "lakeId": { + "type": "string", + "id": 2 + }, + "zoneId": { + "type": "string", + "id": 3 + }, + "assetId": { + "type": "string", + "id": 4 + }, + "dataLocation": { + "type": "string", + "id": 5 + }, + "type": { + "type": "EventType", + "id": 10 + }, + "config": { + "type": "ConfigDetails", + "id": 20 + }, + "entity": { + "type": "EntityDetails", + "id": 21 + }, + "partition": { + "type": "PartitionDetails", + "id": 22 + }, + "action": { + "type": "ActionDetails", + "id": 23 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "CONFIG": 1, + "ENTITY_CREATED": 2, + "ENTITY_UPDATED": 3, + "ENTITY_DELETED": 4, + "PARTITION_CREATED": 5, + "PARTITION_UPDATED": 6, + "PARTITION_DELETED": 7 + } + }, + "EntityType": { + "values": { + "ENTITY_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "ConfigDetails": { + "fields": { + "parameters": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "EntityDetails": { + "fields": { + "entity": { + "type": "string", + "id": 1 + }, + "type": { + "type": "EntityType", + "id": 2 + } + } + }, + "PartitionDetails": { + "fields": { + "partition": { + "type": "string", + "id": 1 + }, + "entity": { + "type": "string", + "id": 2 + }, + "type": { + "type": "EntityType", + "id": 3 + } + } + }, + "ActionDetails": { + "fields": { + "type": { + "type": "string", + "id": 1 + } + } + } + } + }, + "JobEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "jobId": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "state": { + "type": "State", + "id": 5 + }, + "retries": { + "type": "int32", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + }, + "service": { + "type": "Service", + "id": 8 + }, + "serviceJob": { + "type": "string", + "id": 9 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SPARK": 1, + "NOTEBOOK": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "CANCELLED": 3, + "ABORTED": 4 + } + }, + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + } + } + }, + "SessionEvent": { + "oneofs": { + "detail": { + "oneof": [ + "query" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "userId": { + "type": "string", + "id": 2 + }, + "sessionId": { + "type": "string", + "id": 3 + }, + "type": { + "type": "EventType", + "id": 4 + }, + "query": { + "type": "QueryDetail", + "id": 5 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "START": 1, + "STOP": 2, + "QUERY": 3 + } + }, + "QueryDetail": { + "fields": { + "queryId": { + "type": "string", + "id": 1 + }, + "queryText": { + "type": "string", + "id": 2 + }, + "engine": { + "type": "Engine", + "id": 3 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "resultSizeBytes": { + "type": "int64", + "id": 5 + }, + "dataProcessedBytes": { + "type": "int64", + "id": 6 + } + }, + "nested": { + "Engine": { + "values": { + "ENGINE_UNSPECIFIED": 0, + "SPARK_SQL": 1, + "BIGQUERY": 2 + } + } + } + } + } + }, + "MetadataService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetEntity": { + "requestType": "GetEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEntities": { + "requestType": "ListEntitiesRequest", + "responseType": "ListEntitiesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPartition": { + "requestType": "GetPartitionRequest", + "responseType": "Partition", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPartitions": { + "requestType": "ListPartitionsRequest", + "responseType": "ListPartitionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListEntitiesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "TABLES": 1, + "FILESETS": 2 + } + } + } + }, + "ListEntitiesResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEntityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "SCHEMA": 2, + "FULL": 4 + } + } + } + }, + "ListPartitionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPartitionsResponse": { + "fields": { + "partitions": { + "rule": "repeated", + "type": "Partition", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPartitionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + } + } + }, + "Entity": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Entity", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "id": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataPath": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataPathPattern": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "catalogEntry": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "system": { + "type": "StorageSystem", + "id": 15, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "format": { + "type": "StorageFormat", + "id": 16, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "compatibility": { + "type": "CompatibilityStatus", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "schema": { + "type": "Schema", + "id": 50, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "CompatibilityStatus": { + "fields": { + "hiveMetastore": { + "type": "Compatibility", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigquery": { + "type": "Compatibility", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Compatibility": { + "fields": { + "compatible": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reason": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + } + } + }, + "Partition": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Partition", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "location": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "etag": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Schema": { + "fields": { + "userManaged": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionFields": { + "rule": "repeated", + "type": "PartitionField", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionStyle": { + "type": "PartitionStyle", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "BOOLEAN": 1, + "BYTE": 2, + "INT16": 3, + "INT32": 4, + "INT64": 5, + "FLOAT": 6, + "DOUBLE": 7, + "DECIMAL": 8, + "STRING": 9, + "BINARY": 10, + "TIMESTAMP": 11, + "DATE": 12, + "TIME": 13, + "RECORD": 14, + "NULL": 100 + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "REQUIRED": 1, + "NULLABLE": 2, + "REPEATED": 3 + } + }, + "SchemaField": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mode": { + "type": "Mode", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PartitionField": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PartitionStyle": { + "values": { + "PARTITION_STYLE_UNSPECIFIED": 0, + "HIVE_COMPATIBLE": 1 + } + } + } + }, + "StorageFormat": { + "oneofs": { + "options": { + "oneof": [ + "csv", + "json" + ] + } + }, + "fields": { + "format": { + "type": "Format", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compressionFormat": { + "type": "CompressionFormat", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mimeType": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "csv": { + "type": "CsvOptions", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "json": { + "type": "JsonOptions", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "headerRows": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quote": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "PARQUET": 1, + "AVRO": 2, + "ORC": 3, + "CSV": 100, + "JSON": 101, + "IMAGE": 200, + "AUDIO": 201, + "VIDEO": 202, + "TEXT": 203, + "TFRECORD": 204, + "OTHER": 1000, + "UNKNOWN": 1001 + } + }, + "CompressionFormat": { + "values": { + "COMPRESSION_FORMAT_UNSPECIFIED": 0, + "GZIP": 2, + "BZIP2": 3 + } + } + } + }, + "StorageSystem": { + "values": { + "STORAGE_SYSTEM_UNSPECIFIED": 0, + "CLOUD_STORAGE": 1, + "BIGQUERY": 2 + } + }, + "Lake": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Lake", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "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" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastore": { + "type": "Metastore", + "id": 102, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assetStatus": { + "type": "AssetStatus", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastoreStatus": { + "type": "MetastoreStatus", + "id": 104, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Metastore": { + "fields": { + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MetastoreStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endpoint": { + "type": "string", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "NONE": 1, + "READY": 2, + "UPDATING": 3, + "ERROR": 4 + } + } + } + } + } + }, + "AssetStatus": { + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "activeAssets": { + "type": "int32", + "id": 2 + }, + "securityPolicyApplyingAssets": { + "type": "int32", + "id": 3 + } + } + }, + "Zone": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Zone", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "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" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 9, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 103, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceSpec": { + "type": "ResourceSpec", + "id": 104, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "assetStatus": { + "type": "AssetStatus", + "id": 105, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "RAW": 1, + "CURATED": 2 + } + }, + "ResourceSpec": { + "fields": { + "locationType": { + "type": "LocationType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "LocationType": { + "values": { + "LOCATION_TYPE_UNSPECIFIED": 0, + "SINGLE_REGION": 1, + "MULTI_REGION": 2 + } + } + } + }, + "DiscoverySpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "Action": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Action", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" + }, + "oneofs": { + "details": { + "oneof": [ + "invalidDataFormat", + "incompatibleDataSchema", + "invalidDataPartition", + "missingData", + "missingResource", + "unauthorizedResource", + "failedSecurityPolicyApply", + "invalidDataOrganization" + ] + } + }, + "fields": { + "category": { + "type": "Category", + "id": 1 + }, + "issue": { + "type": "string", + "id": 2 + }, + "detectTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "name": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Action" + } + }, + "lake": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "zone": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "asset": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "dataLocations": { + "rule": "repeated", + "type": "string", + "id": 9 + }, + "invalidDataFormat": { + "type": "InvalidDataFormat", + "id": 10 + }, + "incompatibleDataSchema": { + "type": "IncompatibleDataSchema", + "id": 11 + }, + "invalidDataPartition": { + "type": "InvalidDataPartition", + "id": 12 + }, + "missingData": { + "type": "MissingData", + "id": 13 + }, + "missingResource": { + "type": "MissingResource", + "id": 14 + }, + "unauthorizedResource": { + "type": "UnauthorizedResource", + "id": 15 + }, + "failedSecurityPolicyApply": { + "type": "FailedSecurityPolicyApply", + "id": 21 + }, + "invalidDataOrganization": { + "type": "InvalidDataOrganization", + "id": 22 + } + }, + "nested": { + "Category": { + "values": { + "CATEGORY_UNSPECIFIED": 0, + "RESOURCE_MANAGEMENT": 1, + "SECURITY_POLICY": 2, + "DATA_DISCOVERY": 3 + } + }, + "MissingResource": { + "fields": {} + }, + "UnauthorizedResource": { + "fields": {} + }, + "FailedSecurityPolicyApply": { + "fields": { + "asset": { + "type": "string", + "id": 1 + } + } + }, + "InvalidDataFormat": { + "fields": { + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "expectedFormat": { + "type": "string", + "id": 2 + }, + "newFormat": { + "type": "string", + "id": 3 + } + } + }, + "IncompatibleDataSchema": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "existingSchema": { + "type": "string", + "id": 2 + }, + "newSchema": { + "type": "string", + "id": 3 + }, + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "schemaChange": { + "type": "SchemaChange", + "id": 5 + } + }, + "nested": { + "SchemaChange": { + "values": { + "SCHEMA_CHANGE_UNSPECIFIED": 0, + "INCOMPATIBLE": 1, + "MODIFIED": 2 + } + } + } + }, + "InvalidDataPartition": { + "fields": { + "expectedStructure": { + "type": "PartitionStructure", + "id": 1 + } + }, + "nested": { + "PartitionStructure": { + "values": { + "PARTITION_STRUCTURE_UNSPECIFIED": 0, + "CONSISTENT_KEYS": 1, + "HIVE_STYLE_KEYS": 2 + } + } + } + }, + "MissingData": { + "fields": {} + }, + "InvalidDataOrganization": { + "fields": {} + } + } + }, + "Asset": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Asset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "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" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSpec": { + "type": "ResourceSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceStatus": { + "type": "ResourceStatus", + "id": 101, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "securityStatus": { + "type": "SecurityStatus", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 106, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "discoveryStatus": { + "type": "DiscoveryStatus", + "id": 107, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "SecurityStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "APPLYING": 2, + "ERROR": 3 + } + } + } + }, + "DiscoverySpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ResourceSpec": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "STORAGE_BUCKET": 1, + "BIGQUERY_DATASET": 2 + } + } + } + }, + "ResourceStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "ERROR": 2 + } + } + } + }, + "DiscoveryStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "lastRunTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "stats": { + "type": "Stats", + "id": 6 + }, + "lastRunDuration": { + "type": "google.protobuf.Duration", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "IN_PROGRESS": 2, + "PAUSED": 3, + "DISABLED": 5 + } + }, + "Stats": { + "fields": { + "dataItems": { + "type": "int64", + "id": 1 + }, + "dataSize": { + "type": "int64", + "id": 2 + }, + "tables": { + "type": "int64", + "id": 3 + }, + "filesets": { + "type": "int64", + "id": 4 + } + } + } + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "CREATING": 2, + "DELETING": 3, + "ACTION_REQUIRED": 4 + } + }, + "DataplexService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateLake": { + "requestType": "CreateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "parent,lake,lake_id", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/lakes", + "body": "lake" + } + }, + { + "(google.api.method_signature)": "parent,lake,lake_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateLake": { + "requestType": "UpdateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "lake,update_mask", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "body": "lake" + } + }, + { + "(google.api.method_signature)": "lake,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteLake": { + "requestType": "DeleteLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*}", + "(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/*/lakes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListLakes": { + "requestType": "ListLakesRequest", + "responseType": "ListLakesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/lakes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetLake": { + "requestType": "GetLakeRequest", + "responseType": "Lake", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListLakeActions": { + "requestType": "ListLakeActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateZone": { + "requestType": "CreateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "parent,zone,zone_id", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "parent,zone,zone_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateZone": { + "requestType": "UpdateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "zone,update_mask", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "zone,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteZone": { + "requestType": "DeleteZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(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/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListZones": { + "requestType": "ListZonesRequest", + "responseType": "ListZonesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetZone": { + "requestType": "GetZoneRequest", + "responseType": "Zone", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListZoneActions": { + "requestType": "ListZoneActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateAsset": { + "requestType": "CreateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "parent,asset,asset_id", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "parent,asset,asset_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateAsset": { + "requestType": "UpdateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "asset,update_mask", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "asset,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteAsset": { + "requestType": "DeleteAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(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/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListAssets": { + "requestType": "ListAssetsRequest", + "responseType": "ListAssetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAsset": { + "requestType": "GetAssetRequest", + "responseType": "Asset", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAssetActions": { + "requestType": "ListAssetActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateTask": { + "requestType": "CreateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.http).body": "task", + "(google.api.method_signature)": "parent,task,task_id", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "body": "task" + } + }, + { + "(google.api.method_signature)": "parent,task,task_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateTask": { + "requestType": "UpdateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.http).body": "task", + "(google.api.method_signature)": "task,update_mask", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "body": "task" + } + }, + { + "(google.api.method_signature)": "task,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteTask": { + "requestType": "DeleteTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(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/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListTasks": { + "requestType": "ListTasksRequest", + "responseType": "ListTasksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTask": { + "requestType": "GetTaskRequest", + "responseType": "Task", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListJobs": { + "requestType": "ListJobsRequest", + "responseType": "ListJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetJob": { + "requestType": "GetJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelJob": { + "requestType": "CancelJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateLakeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "lakeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateLakeRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "ListLakesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListLakesResponse": { + "fields": { + "lakes": { + "rule": "repeated", + "type": "Lake", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ListLakeActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListActionsResponse": { + "fields": { + "actions": { + "rule": "repeated", + "type": "Action", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "CreateZoneRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "zoneId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateZoneRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteZoneRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + } + } + }, + "ListZonesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListZonesResponse": { + "fields": { + "zones": { + "rule": "repeated", + "type": "Zone", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListZoneActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetZoneRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + } + } + }, + "CreateAssetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "assetId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "Asset", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAssetRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "Asset", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + } + } + }, + "ListAssetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAssetsResponse": { + "fields": { + "assets": { + "rule": "repeated", + "type": "Asset", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListAssetActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + } + } + }, + "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" + } + } + } + }, + "CreateTaskRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "taskId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "task": { + "type": "Task", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateTaskRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "task": { + "type": "Task", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + } + } + }, + "ListTasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTasksResponse": { + "fields": { + "tasks": { + "rule": "repeated", + "type": "Task", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + } + } + }, + "GetJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "ListJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "Job", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "Task": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Task", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" + }, + "oneofs": { + "config": { + "oneof": [ + "spark" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "triggerSpec": { + "type": "TriggerSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionSpec": { + "type": "ExecutionSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "spark": { + "type": "SparkTaskConfig", + "id": 300 + } + }, + "nested": { + "InfrastructureSpec": { + "oneofs": { + "resources": { + "oneof": [ + "batch" + ] + }, + "runtime": { + "oneof": [ + "containerImage" + ] + }, + "network": { + "oneof": [ + "vpcNetwork" + ] + } + }, + "fields": { + "batch": { + "type": "BatchComputeResources", + "id": 52 + }, + "containerImage": { + "type": "ContainerImageRuntime", + "id": 101 + }, + "vpcNetwork": { + "type": "VpcNetwork", + "id": 150 + } + }, + "nested": { + "BatchComputeResources": { + "fields": { + "executorsCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxExecutorsCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ContainerImageRuntime": { + "fields": { + "javaJars": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonPackages": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "properties": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "VpcNetwork": { + "oneofs": { + "networkName": { + "oneof": [ + "network", + "subNetwork" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subNetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "TriggerSpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "type": { + "type": "Type", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxRetries": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "RECURRING": 2 + } + } + } + }, + "ExecutionSpec": { + "fields": { + "args": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "maxJobExecutionLifetime": { + "type": "google.protobuf.Duration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SparkTaskConfig": { + "oneofs": { + "driver": { + "oneof": [ + "mainJarFileUri", + "mainClass", + "pythonScriptFile", + "sqlScriptFile", + "sqlScript" + ] + } + }, + "fields": { + "mainJarFileUri": { + "type": "string", + "id": 100 + }, + "mainClass": { + "type": "string", + "id": 101 + }, + "pythonScriptFile": { + "type": "string", + "id": 102 + }, + "sqlScriptFile": { + "type": "string", + "id": 104 + }, + "sqlScript": { + "type": "string", + "id": 105 + }, + "fileUris": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "archiveUris": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "Job": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Job", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "retryCount": { + "type": "uint32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "service": { + "type": "Service", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceJob": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "ABORTED": 6 + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "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 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 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 + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js new file mode 100644 index 00000000000..571a9e7d004 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_CancelJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCancelJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.cancelJob(request); + console.log(response); + } + + callCancelJob(); + // [END dataplex_v1_generated_DataplexService_CancelJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js new file mode 100644 index 00000000000..9f6b6fe17dc --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent, assetId, asset) { + // [START dataplex_v1_generated_DataplexService_CreateAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + */ + // const parent = 'abc123' + /** + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + */ + // const assetId = 'abc123' + /** + * Required. Asset resource. + */ + // const asset = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateAsset() { + // Construct request + const request = { + parent, + assetId, + asset, + }; + + // Run request + const [operation] = await dataplexClient.createAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAsset(); + // [END dataplex_v1_generated_DataplexService_CreateAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js new file mode 100644 index 00000000000..277557d813a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent, lakeId, lake) { + // [START dataplex_v1_generated_DataplexService_CreateLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + */ + // const lakeId = 'abc123' + /** + * Required. Lake resource + */ + // const lake = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateLake() { + // Construct request + const request = { + parent, + lakeId, + lake, + }; + + // Run request + const [operation] = await dataplexClient.createLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateLake(); + // [END dataplex_v1_generated_DataplexService_CreateLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js new file mode 100644 index 00000000000..3a1d0f39baf --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js @@ -0,0 +1,70 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent, taskId, task) { + // [START dataplex_v1_generated_DataplexService_CreateTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Required. Task identifier. + */ + // const taskId = 'abc123' + /** + * Required. Task resource. + */ + // const task = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateTask() { + // Construct request + const request = { + parent, + taskId, + task, + }; + + // Run request + const [operation] = await dataplexClient.createTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateTask(); + // [END dataplex_v1_generated_DataplexService_CreateTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js new file mode 100644 index 00000000000..fa5a28f442c --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent, zoneId, zone) { + // [START dataplex_v1_generated_DataplexService_CreateZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + */ + // const zoneId = 'abc123' + /** + * Required. Zone resource. + */ + // const zone = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateZone() { + // Construct request + const request = { + parent, + zoneId, + zone, + }; + + // Run request + const [operation] = await dataplexClient.createZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateZone(); + // [END dataplex_v1_generated_DataplexService_CreateZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js new file mode 100644 index 00000000000..34d11856550 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAsset(); + // [END dataplex_v1_generated_DataplexService_DeleteAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js new file mode 100644 index 00000000000..108970521fe --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteLake() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteLake(); + // [END dataplex_v1_generated_DataplexService_DeleteLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js new file mode 100644 index 00000000000..c50e0e9f176 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteTask() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteTask(); + // [END dataplex_v1_generated_DataplexService_DeleteTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js new file mode 100644 index 00000000000..b82b3de916f --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteZone() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteZone(); + // [END dataplex_v1_generated_DataplexService_DeleteZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js new file mode 100644 index 00000000000..ee6bc13b0e4 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getAsset(request); + console.log(response); + } + + callGetAsset(); + // [END dataplex_v1_generated_DataplexService_GetAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js new file mode 100644 index 00000000000..92512f727cc --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getJob(request); + console.log(response); + } + + callGetJob(); + // [END dataplex_v1_generated_DataplexService_GetJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js new file mode 100644 index 00000000000..dca3aad3666 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetLake() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getLake(request); + console.log(response); + } + + callGetLake(); + // [END dataplex_v1_generated_DataplexService_GetLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js new file mode 100644 index 00000000000..2ec07de5925 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getTask(request); + console.log(response); + } + + callGetTask(); + // [END dataplex_v1_generated_DataplexService_GetTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js new file mode 100644 index 00000000000..79cb650b73a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetZone() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getZone(request); + console.log(response); + } + + callGetZone(); + // [END dataplex_v1_generated_DataplexService_GetZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js new file mode 100644 index 00000000000..db2dd765c8a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListAssetActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListAssetActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listAssetActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAssetActions(); + // [END dataplex_v1_generated_DataplexService_ListAssetActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js new file mode 100644 index 00000000000..c6622647c4c --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListAssets_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListAssets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listAssetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAssets(); + // [END dataplex_v1_generated_DataplexService_ListAssets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js new file mode 100644 index 00000000000..edef9580927 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListJobs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListJobs(); + // [END dataplex_v1_generated_DataplexService_ListJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js new file mode 100644 index 00000000000..ebf6bcd4aaf --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListLakeActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListLakeActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listLakeActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLakeActions(); + // [END dataplex_v1_generated_DataplexService_ListLakeActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js new file mode 100644 index 00000000000..0c9b5b51d3d --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListLakes_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListLakes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listLakesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLakes(); + // [END dataplex_v1_generated_DataplexService_ListLakes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js new file mode 100644 index 00000000000..a52d7c8d820 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListTasks_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListTasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listTasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTasks(); + // [END dataplex_v1_generated_DataplexService_ListTasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js new file mode 100644 index 00000000000..f1eb3d166e7 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListZoneActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListZoneActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listZoneActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListZoneActions(); + // [END dataplex_v1_generated_DataplexService_ListZoneActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js new file mode 100644 index 00000000000..7d439497c8f --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListZones_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListZones() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listZonesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListZones(); + // [END dataplex_v1_generated_DataplexService_ListZones_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js new file mode 100644 index 00000000000..88a58559c22 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(updateMask, asset) { + // [START dataplex_v1_generated_DataplexService_UpdateAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const asset = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateAsset() { + // Construct request + const request = { + updateMask, + asset, + }; + + // Run request + const [operation] = await dataplexClient.updateAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAsset(); + // [END dataplex_v1_generated_DataplexService_UpdateAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js new file mode 100644 index 00000000000..d4fb25c6bfe --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(updateMask, lake) { + // [START dataplex_v1_generated_DataplexService_UpdateLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const lake = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateLake() { + // Construct request + const request = { + updateMask, + lake, + }; + + // Run request + const [operation] = await dataplexClient.updateLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateLake(); + // [END dataplex_v1_generated_DataplexService_UpdateLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js new file mode 100644 index 00000000000..e6de0b6d2d2 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(updateMask, task) { + // [START dataplex_v1_generated_DataplexService_UpdateTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const task = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateTask() { + // Construct request + const request = { + updateMask, + task, + }; + + // Run request + const [operation] = await dataplexClient.updateTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateTask(); + // [END dataplex_v1_generated_DataplexService_UpdateTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js new file mode 100644 index 00000000000..6243dd9f770 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(updateMask, zone) { + // [START dataplex_v1_generated_DataplexService_UpdateZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const zone = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateZone() { + // Construct request + const request = { + updateMask, + zone, + }; + + // Run request + const [operation] = await dataplexClient.updateZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateZone(); + // [END dataplex_v1_generated_DataplexService_UpdateZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js new file mode 100644 index 00000000000..1dcf6ebecfc --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js @@ -0,0 +1,59 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_GetEntity_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + */ + // const name = 'abc123' + /** + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + */ + // const view = {} + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callGetEntity() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEntity(request); + console.log(response); + } + + callGetEntity(); + // [END dataplex_v1_generated_MetadataService_GetEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js new file mode 100644 index 00000000000..955eaa0b85d --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_GetPartition_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callGetPartition() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getPartition(request); + console.log(response); + } + + callGetPartition(); + // [END dataplex_v1_generated_MetadataService_GetPartition_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js new file mode 100644 index 00000000000..7c2f5211b1b --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent, view) { + // [START dataplex_v1_generated_MetadataService_ListEntities_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Required. Specify the entity view to make a partial list request. + */ + // const view = {} + /** + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request by name prefix. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callListEntities() { + // Construct request + const request = { + parent, + view, + }; + + // Run request + const iterable = await dataplexClient.listEntitiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEntities(); + // [END dataplex_v1_generated_MetadataService_ListEntities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js new file mode 100644 index 00000000000..233476471a8 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js @@ -0,0 +1,73 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_MetadataService_ListPartitions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callListPartitions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listPartitionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPartitions(); + // [END dataplex_v1_generated_MetadataService_ListPartitions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/src/index.ts b/packages/google-cloud-dataplex/src/index.ts new file mode 100644 index 00000000000..b43c86f4bc8 --- /dev/null +++ b/packages/google-cloud-dataplex/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 DataplexServiceClient = v1.DataplexServiceClient; +type DataplexServiceClient = v1.DataplexServiceClient; +const MetadataServiceClient = v1.MetadataServiceClient; +type MetadataServiceClient = v1.MetadataServiceClient; + +export {v1, DataplexServiceClient, MetadataServiceClient}; +export default {v1, DataplexServiceClient, MetadataServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts new file mode 100644 index 00000000000..792f44008ad --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -0,0 +1,5318 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/dataplex_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataplex_service_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * Dataplex service provides data lakes as a service. The primary resources + * offered by this service are Lakes, Zones and Assets which collectively allow + * a data adminstrator to organize, manage, secure and catalog data across their + * organization located across cloud projects in a variety of storage systems + * including Cloud Storage and BigQuery. + * @class + * @memberof v1 + */ +export class DataplexServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataplexServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataplexServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataplexServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listLakes: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'lakes' + ), + listLakeActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'actions' + ), + listZones: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'zones' + ), + listZoneActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'actions' + ), + listAssets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'assets' + ), + listAssetActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'actions' + ), + listTasks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tasks' + ), + listJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobs' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createLakeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Lake' + ) as gax.protobuf.Type; + const createLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateLakeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Lake' + ) as gax.protobuf.Type; + const updateLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteLakeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createZoneResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Zone' + ) as gax.protobuf.Type; + const createZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateZoneResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Zone' + ) as gax.protobuf.Type; + const updateZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteZoneResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createAssetResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Asset' + ) as gax.protobuf.Type; + const createAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateAssetResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Asset' + ) as gax.protobuf.Type; + const updateAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteAssetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createTaskResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Task' + ) as gax.protobuf.Type; + const createTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateTaskResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Task' + ) as gax.protobuf.Type; + const updateTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteTaskResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createLakeResponse.decode.bind(createLakeResponse), + createLakeMetadata.decode.bind(createLakeMetadata) + ), + updateLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateLakeResponse.decode.bind(updateLakeResponse), + updateLakeMetadata.decode.bind(updateLakeMetadata) + ), + deleteLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteLakeResponse.decode.bind(deleteLakeResponse), + deleteLakeMetadata.decode.bind(deleteLakeMetadata) + ), + createZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createZoneResponse.decode.bind(createZoneResponse), + createZoneMetadata.decode.bind(createZoneMetadata) + ), + updateZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateZoneResponse.decode.bind(updateZoneResponse), + updateZoneMetadata.decode.bind(updateZoneMetadata) + ), + deleteZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteZoneResponse.decode.bind(deleteZoneResponse), + deleteZoneMetadata.decode.bind(deleteZoneMetadata) + ), + createAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAssetResponse.decode.bind(createAssetResponse), + createAssetMetadata.decode.bind(createAssetMetadata) + ), + updateAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAssetResponse.decode.bind(updateAssetResponse), + updateAssetMetadata.decode.bind(updateAssetMetadata) + ), + deleteAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAssetResponse.decode.bind(deleteAssetResponse), + deleteAssetMetadata.decode.bind(deleteAssetMetadata) + ), + createTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createTaskResponse.decode.bind(createTaskResponse), + createTaskMetadata.decode.bind(createTaskMetadata) + ), + updateTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateTaskResponse.decode.bind(updateTaskResponse), + updateTaskMetadata.decode.bind(updateTaskMetadata) + ), + deleteTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteTaskResponse.decode.bind(deleteTaskResponse), + deleteTaskMetadata.decode.bind(deleteTaskMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.DataplexService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataplexServiceStub) { + return this.dataplexServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.DataplexService. + this.dataplexServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataplex.v1.DataplexService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.DataplexService, + 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 dataplexServiceStubMethods = [ + 'createLake', + 'updateLake', + 'deleteLake', + 'listLakes', + 'getLake', + 'listLakeActions', + 'createZone', + 'updateZone', + 'deleteZone', + 'listZones', + 'getZone', + 'listZoneActions', + 'createAsset', + 'updateAsset', + 'deleteAsset', + 'listAssets', + 'getAsset', + 'listAssetActions', + 'createTask', + 'updateTask', + 'deleteTask', + 'listTasks', + 'getTask', + 'listJobs', + 'getJob', + 'cancelJob', + ]; + for (const methodName of dataplexServiceStubMethods) { + const callPromise = this.dataplexServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataplexServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataplex.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 'dataplex.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 -- + // ------------------- + /** + * Retrieves a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_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 [Lake]{@link google.cloud.dataplex.v1.Lake}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_lake.js + * region_tag:dataplex_v1_generated_DataplexService_GetLake_async + */ + getLake( + request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | undefined, + {} | undefined + ] + >; + getLake( + request: protos.google.cloud.dataplex.v1.IGetLakeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + > + ): void; + getLake( + request: protos.google.cloud.dataplex.v1.IGetLakeRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + > + ): void; + getLake( + request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getLake(request, options, callback); + } + /** + * Retrieves a zone resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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 [Zone]{@link google.cloud.dataplex.v1.Zone}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_zone.js + * region_tag:dataplex_v1_generated_DataplexService_GetZone_async + */ + getZone( + request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | undefined, + {} | undefined + ] + >; + getZone( + request: protos.google.cloud.dataplex.v1.IGetZoneRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + > + ): void; + getZone( + request: protos.google.cloud.dataplex.v1.IGetZoneRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + > + ): void; + getZone( + request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getZone(request, options, callback); + } + /** + * Retrieves an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_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 [Asset]{@link google.cloud.dataplex.v1.Asset}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_asset.js + * region_tag:dataplex_v1_generated_DataplexService_GetAsset_async + */ + getAsset( + request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | undefined, + {} | undefined + ] + >; + getAsset( + request: protos.google.cloud.dataplex.v1.IGetAssetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + > + ): void; + getAsset( + request: protos.google.cloud.dataplex.v1.IGetAssetRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + > + ): void; + getAsset( + request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getAsset(request, options, callback); + } + /** + * Get task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_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 [Task]{@link google.cloud.dataplex.v1.Task}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_task.js + * region_tag:dataplex_v1_generated_DataplexService_GetTask_async + */ + getTask( + request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | undefined, + {} | undefined + ] + >; + getTask( + request: protos.google.cloud.dataplex.v1.IGetTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + > + ): void; + getTask( + request: protos.google.cloud.dataplex.v1.IGetTaskRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + > + ): void; + getTask( + request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getTask(request, options, callback); + } + /** + * Get job resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_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 [Job]{@link google.cloud.dataplex.v1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_job.js + * region_tag:dataplex_v1_generated_DataplexService_GetJob_async + */ + getJob( + request?: protos.google.cloud.dataplex.v1.IGetJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | undefined, + {} | undefined + ] + >; + getJob( + request: protos.google.cloud.dataplex.v1.IGetJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getJob( + request: protos.google.cloud.dataplex.v1.IGetJobRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getJob( + request?: protos.google.cloud.dataplex.v1.IGetJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getJob(request, options, callback); + } + /** + * Cancel jobs running for the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.cancel_job.js + * region_tag:dataplex_v1_generated_DataplexService_CancelJob_async + */ + cancelJob( + request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | undefined, + {} | undefined + ] + >; + cancelJob( + request: protos.google.cloud.dataplex.v1.ICancelJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + > + ): void; + cancelJob( + request: protos.google.cloud.dataplex.v1.ICancelJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + > + ): void; + cancelJob( + request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.cancelJob(request, options, callback); + } + + /** + * Creates a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {string} request.lakeId + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @param {google.cloud.dataplex.v1.Lake} request.lake + * Required. Lake resource + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_lake.js + * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async + */ + createLake( + request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createLake( + request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createLake( + request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createLake( + request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createLake(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createLake()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_lake.js + * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async + */ + async checkCreateLakeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createLake, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Updates a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Lake} request.lake + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_lake.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async + */ + updateLake( + request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateLake( + request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateLake( + request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateLake( + request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'lake.name': request.lake!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateLake(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateLake()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_lake.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async + */ + async checkUpdateLakeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateLake, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Deletes a lake resource. All zones within the lake must be deleted before + * the lake can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_lake.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async + */ + deleteLake( + request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteLake( + request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteLake( + request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteLake( + request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteLake(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteLake()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_lake.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async + */ + async checkDeleteLakeProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteLake, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Creates a zone resource within a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {string} request.zoneId + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * @param {google.cloud.dataplex.v1.Zone} request.zone + * Required. Zone resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_zone.js + * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async + */ + createZone( + request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createZone( + request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createZone( + request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createZone( + request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createZone(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createZone()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_zone.js + * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async + */ + async checkCreateZoneProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createZone, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Updates a zone resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Zone} request.zone + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_zone.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async + */ + updateZone( + request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateZone( + request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateZone( + request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateZone( + request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'zone.name': request.zone!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateZone(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateZone()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_zone.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async + */ + async checkUpdateZoneProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateZone, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Deletes a zone resource. All assets within a zone must be deleted before + * the zone can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_zone.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async + */ + deleteZone( + request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteZone( + request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteZone( + request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteZone( + request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteZone(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteZone()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_zone.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async + */ + async checkDeleteZoneProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteZone, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Creates an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + * @param {string} request.assetId + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * @param {google.cloud.dataplex.v1.Asset} request.asset + * Required. Asset resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_asset.js + * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async + */ + createAsset( + request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createAsset( + request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAsset( + request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAsset( + request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_asset.js + * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async + */ + async checkCreateAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createAsset, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Updates an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Asset} request.asset + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_asset.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async + */ + updateAsset( + request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateAsset( + request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAsset( + request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAsset( + request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'asset.name': request.asset!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_asset.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async + */ + async checkUpdateAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateAsset, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Deletes an asset resource. The referenced storage resource is detached + * (default) or deleted based on the associated Lifecycle policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_asset.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async + */ + deleteAsset( + request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteAsset( + request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAsset( + request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAsset( + request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_asset.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async + */ + async checkDeleteAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteAsset, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Creates a task resource within a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {string} request.taskId + * Required. Task identifier. + * @param {google.cloud.dataplex.v1.Task} request.task + * Required. Task resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_task.js + * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async + */ + createTask( + request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createTask( + request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTask( + request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTask( + request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createTask(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createTask()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_task.js + * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async + */ + async checkCreateTaskProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createTask, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Update the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Task} request.task + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_task.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async + */ + updateTask( + request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateTask( + request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateTask( + request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateTask( + request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'task.name': request.task!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateTask(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateTask()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_task.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async + */ + async checkUpdateTaskProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateTask, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Delete the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_task.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async + */ + deleteTask( + request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteTask( + request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTask( + request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTask( + request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteTask(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteTask()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_task.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async + */ + async checkDeleteTaskProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteTask, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Lists lake resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Lake]{@link google.cloud.dataplex.v1.Lake}. + * 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 `listLakesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest | null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ] + >; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): void; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): void; + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest | null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listLakes(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 resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Lake]{@link google.cloud.dataplex.v1.Lake} 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 `listLakesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakesStream( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.createStream( + this.innerApiCalls.listLakes as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLakes`, 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 resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Lake]{@link google.cloud.dataplex.v1.Lake}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_lakes.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakes_async + */ + listLakesAsync( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.asyncIterate( + this.innerApiCalls['listLakes'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @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 [Action]{@link google.cloud.dataplex.v1.Action}. + * 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 `listLakeActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + >; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + | protos.google.cloud.dataplex.v1.IListActionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listLakeActions(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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @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 [Action]{@link google.cloud.dataplex.v1.Action} 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 `listLakeActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakeActionsStream( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.createStream( + this.innerApiCalls.listLakeActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLakeActions`, 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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_lake_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakeActions_async + */ + listLakeActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.asyncIterate( + this.innerApiCalls['listLakeActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists zone resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Zone]{@link google.cloud.dataplex.v1.Zone}. + * 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 `listZonesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest | null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ] + >; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): void; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): void; + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest | null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listZones(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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Zone]{@link google.cloud.dataplex.v1.Zone} 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 `listZonesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZonesStream( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZones']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZones.createStream( + this.innerApiCalls.listZones as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listZones`, 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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Zone]{@link google.cloud.dataplex.v1.Zone}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_zones.js + * region_tag:dataplex_v1_generated_DataplexService_ListZones_async + */ + listZonesAsync( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZones']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZones.asyncIterate( + this.innerApiCalls['listZones'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the page + * token. + * @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 [Action]{@link google.cloud.dataplex.v1.Action}. + * 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 `listZoneActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + >; + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + | protos.google.cloud.dataplex.v1.IListActionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listZoneActions(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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the page + * token. + * @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 [Action]{@link google.cloud.dataplex.v1.Action} 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 `listZoneActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZoneActionsStream( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZoneActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZoneActions.createStream( + this.innerApiCalls.listZoneActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listZoneActions`, 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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_zone_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListZoneActions_async + */ + listZoneActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZoneActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZoneActions.asyncIterate( + this.innerApiCalls['listZoneActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists asset resources in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Asset]{@link google.cloud.dataplex.v1.Asset}. + * 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 `listAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetsResponse + ] + >; + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset + > + ): void; + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset + > + ): void; + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + | protos.google.cloud.dataplex.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAsset + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listAssets(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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Asset]{@link google.cloud.dataplex.v1.Asset} 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 `listAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssetsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.createStream( + this.innerApiCalls.listAssets as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAssets`, 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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Asset]{@link google.cloud.dataplex.v1.Asset}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_assets.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssets_async + */ + listAssetsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.asyncIterate( + this.innerApiCalls['listAssets'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in an asset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page + * token. + * @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 [Action]{@link google.cloud.dataplex.v1.Action}. + * 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 `listAssetActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + >; + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + | protos.google.cloud.dataplex.v1.IListActionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listAssetActions(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 resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page + * token. + * @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 [Action]{@link google.cloud.dataplex.v1.Action} 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 `listAssetActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssetActionsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssetActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssetActions.createStream( + this.innerApiCalls.listAssetActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAssetActions`, 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 resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_asset_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssetActions_async + */ + listAssetActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssetActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssetActions.asyncIterate( + this.innerApiCalls['listAssetActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists tasks under the given lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Task]{@link google.cloud.dataplex.v1.Task}. + * 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 `listTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest | null, + protos.google.cloud.dataplex.v1.IListTasksResponse + ] + >; + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + > + ): void; + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + > + ): void; + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest | null, + protos.google.cloud.dataplex.v1.IListTasksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listTasks(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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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 [Task]{@link google.cloud.dataplex.v1.Task} 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 `listTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTasksStream( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTasks.createStream( + this.innerApiCalls.listTasks as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listTasks`, 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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Task]{@link google.cloud.dataplex.v1.Task}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_tasks.js + * region_tag:dataplex_v1_generated_DataplexService_ListTasks_async + */ + listTasksAsync( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTasks.asyncIterate( + this.innerApiCalls['listTasks'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists Jobs under the given task. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @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 [Job]{@link google.cloud.dataplex.v1.Job}. + * 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 `listJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest | null, + protos.google.cloud.dataplex.v1.IListJobsResponse + ] + >; + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + > + ): void; + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + > + ): void; + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest | null, + protos.google.cloud.dataplex.v1.IListJobsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listJobs(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 resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @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 [Job]{@link google.cloud.dataplex.v1.Job} 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 `listJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listJobsStream( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobs.createStream( + this.innerApiCalls.listJobs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listJobs`, 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 resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Job]{@link google.cloud.dataplex.v1.Job}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_jobs.js + * region_tag:dataplex_v1_generated_DataplexService_ListJobs_async + */ + listJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobs.asyncIterate( + this.innerApiCalls['listJobs'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string + ) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string + ) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath( + project: string, + location: string, + lake: string, + task: string, + job: string + ) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project: string, location: string, lake: string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string, + partition: string + ) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath( + project: string, + location: string, + lake: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath( + project: string, + location: string, + lake: string, + zone: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render( + { + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + } + ); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).action; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project: string, location: string, lake: string, task: string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project: string, location: string, lake: string, zone: string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.dataplexServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json new file mode 100644 index 00000000000..f28861f96c6 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json @@ -0,0 +1,168 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataplexService": { + "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": { + "CreateLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLakes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetLake": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListLakeActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListZones": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetZone": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListZoneActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAssets": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAsset": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAssetActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetTask": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CancelJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json new file mode 100644 index 00000000000..2f2fea78052 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..2ae53e6b9be --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json @@ -0,0 +1,377 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataplex.v1", + "libraryPackage": "@google-cloud/dataplex", + "services": { + "DataplexService": { + "clients": { + "grpc": { + "libraryClient": "DataplexServiceClient", + "rpcs": { + "GetLake": { + "methods": [ + "getLake" + ] + }, + "GetZone": { + "methods": [ + "getZone" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "CancelJob": { + "methods": [ + "cancelJob" + ] + }, + "CreateLake": { + "methods": [ + "createLake" + ] + }, + "UpdateLake": { + "methods": [ + "updateLake" + ] + }, + "DeleteLake": { + "methods": [ + "deleteLake" + ] + }, + "CreateZone": { + "methods": [ + "createZone" + ] + }, + "UpdateZone": { + "methods": [ + "updateZone" + ] + }, + "DeleteZone": { + "methods": [ + "deleteZone" + ] + }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "UpdateTask": { + "methods": [ + "updateTask" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "ListLakes": { + "methods": [ + "listLakes", + "listLakesStream", + "listLakesAsync" + ] + }, + "ListLakeActions": { + "methods": [ + "listLakeActions", + "listLakeActionsStream", + "listLakeActionsAsync" + ] + }, + "ListZones": { + "methods": [ + "listZones", + "listZonesStream", + "listZonesAsync" + ] + }, + "ListZoneActions": { + "methods": [ + "listZoneActions", + "listZoneActionsStream", + "listZoneActionsAsync" + ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] + }, + "ListAssetActions": { + "methods": [ + "listAssetActions", + "listAssetActionsStream", + "listAssetActionsAsync" + ] + }, + "ListTasks": { + "methods": [ + "listTasks", + "listTasksStream", + "listTasksAsync" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataplexServiceClient", + "rpcs": { + "GetLake": { + "methods": [ + "getLake" + ] + }, + "GetZone": { + "methods": [ + "getZone" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "CancelJob": { + "methods": [ + "cancelJob" + ] + }, + "CreateLake": { + "methods": [ + "createLake" + ] + }, + "UpdateLake": { + "methods": [ + "updateLake" + ] + }, + "DeleteLake": { + "methods": [ + "deleteLake" + ] + }, + "CreateZone": { + "methods": [ + "createZone" + ] + }, + "UpdateZone": { + "methods": [ + "updateZone" + ] + }, + "DeleteZone": { + "methods": [ + "deleteZone" + ] + }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "UpdateTask": { + "methods": [ + "updateTask" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "ListLakes": { + "methods": [ + "listLakes", + "listLakesStream", + "listLakesAsync" + ] + }, + "ListLakeActions": { + "methods": [ + "listLakeActions", + "listLakeActionsStream", + "listLakeActionsAsync" + ] + }, + "ListZones": { + "methods": [ + "listZones", + "listZonesStream", + "listZonesAsync" + ] + }, + "ListZoneActions": { + "methods": [ + "listZoneActions", + "listZoneActionsStream", + "listZoneActionsAsync" + ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] + }, + "ListAssetActions": { + "methods": [ + "listAssetActions", + "listAssetActionsStream", + "listAssetActionsAsync" + ] + }, + "ListTasks": { + "methods": [ + "listTasks", + "listTasksStream", + "listTasksAsync" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + } + } + } + } + }, + "MetadataService": { + "clients": { + "grpc": { + "libraryClient": "MetadataServiceClient", + "rpcs": { + "GetEntity": { + "methods": [ + "getEntity" + ] + }, + "GetPartition": { + "methods": [ + "getPartition" + ] + }, + "ListEntities": { + "methods": [ + "listEntities", + "listEntitiesStream", + "listEntitiesAsync" + ] + }, + "ListPartitions": { + "methods": [ + "listPartitions", + "listPartitionsStream", + "listPartitionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MetadataServiceClient", + "rpcs": { + "GetEntity": { + "methods": [ + "getEntity" + ] + }, + "GetPartition": { + "methods": [ + "getPartition" + ] + }, + "ListEntities": { + "methods": [ + "listEntities", + "listEntitiesStream", + "listEntitiesAsync" + ] + }, + "ListPartitions": { + "methods": [ + "listPartitions", + "listPartitionsStream", + "listPartitionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/index.ts b/packages/google-cloud-dataplex/src/v1/index.ts new file mode 100644 index 00000000000..9312f69f1fc --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/index.ts @@ -0,0 +1,20 @@ +// 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. +// +// ** 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 {DataplexServiceClient} from './dataplex_service_client'; +export {MetadataServiceClient} from './metadata_service_client'; diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts new file mode 100644 index 00000000000..603a2fa5283 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -0,0 +1,1793 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/metadata_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './metadata_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Metadata service manages metadata resources such as tables, filesets and + * partitions. + * @class + * @memberof v1 + */ +export class MetadataServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + metadataServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MetadataServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MetadataServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listEntities: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'entities' + ), + listPartitions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'partitions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.MetadataService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.metadataServiceStub) { + return this.metadataServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.MetadataService. + this.metadataServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataplex.v1.MetadataService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.MetadataService, + 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 metadataServiceStubMethods = [ + 'getEntity', + 'listEntities', + 'getPartition', + 'listPartitions', + ]; + for (const methodName of metadataServiceStubMethods) { + const callPromise = this.metadataServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.metadataServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataplex.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 'dataplex.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 -- + // ------------------- + /** + * Get a metadata entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * @param {google.cloud.dataplex.v1.GetEntityRequest.EntityView} [request.view] + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entity]{@link google.cloud.dataplex.v1.Entity}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.get_entity.js + * region_tag:dataplex_v1_generated_MetadataService_GetEntity_async + */ + getEntity( + request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | undefined, + {} | undefined + ] + >; + getEntity( + request: protos.google.cloud.dataplex.v1.IGetEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + getEntity( + request: protos.google.cloud.dataplex.v1.IGetEntityRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + getEntity( + request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getEntity(request, options, callback); + } + /** + * Get a metadata partition of an entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_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 [Partition]{@link google.cloud.dataplex.v1.Partition}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.get_partition.js + * region_tag:dataplex_v1_generated_MetadataService_GetPartition_async + */ + getPartition( + request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | undefined, + {} | undefined + ] + >; + getPartition( + request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | null | undefined, + {} | null | undefined + > + ): void; + getPartition( + request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | null | undefined, + {} | null | undefined + > + ): void; + getPartition( + request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IPartition, + | protos.google.cloud.dataplex.v1.IGetPartitionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getPartition(request, options, callback); + } + + /** + * List metadata entities in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request by name prefix. + * @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 [Entity]{@link google.cloud.dataplex.v1.Entity}. + * 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 `listEntitiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEntities( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity[], + protos.google.cloud.dataplex.v1.IListEntitiesRequest | null, + protos.google.cloud.dataplex.v1.IListEntitiesResponse + ] + >; + listEntities( + request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IEntity + > + ): void; + listEntities( + request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IEntity + > + ): void; + listEntities( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + | protos.google.cloud.dataplex.v1.IListEntitiesResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IEntity + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IEntity + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity[], + protos.google.cloud.dataplex.v1.IListEntitiesRequest | null, + protos.google.cloud.dataplex.v1.IListEntitiesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listEntities(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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request by name prefix. + * @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 [Entity]{@link google.cloud.dataplex.v1.Entity} 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 `listEntitiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEntitiesStream( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listEntities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntities.createStream( + this.innerApiCalls.listEntities as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listEntities`, 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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request by name prefix. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Entity]{@link google.cloud.dataplex.v1.Entity}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.list_entities.js + * region_tag:dataplex_v1_generated_MetadataService_ListEntities_async + */ + listEntitiesAsync( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listEntities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntities.asyncIterate( + this.innerApiCalls['listEntities'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * List metadata partitions of an entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @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 [Partition]{@link google.cloud.dataplex.v1.Partition}. + * 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 `listPartitionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPartitions( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition[], + protos.google.cloud.dataplex.v1.IListPartitionsRequest | null, + protos.google.cloud.dataplex.v1.IListPartitionsResponse + ] + >; + listPartitions( + request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + > + ): void; + listPartitions( + request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + > + ): void; + listPartitions( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition[], + protos.google.cloud.dataplex.v1.IListPartitionsRequest | null, + protos.google.cloud.dataplex.v1.IListPartitionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listPartitions(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 resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @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 [Partition]{@link google.cloud.dataplex.v1.Partition} 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 `listPartitionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPartitionsStream( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listPartitions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPartitions.createStream( + this.innerApiCalls.listPartitions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listPartitions`, 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 resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Partition]{@link google.cloud.dataplex.v1.Partition}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.list_partitions.js + * region_tag:dataplex_v1_generated_MetadataService_ListPartitions_async + */ + listPartitionsAsync( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listPartitions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPartitions.asyncIterate( + this.innerApiCalls['listPartitions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string + ) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string + ) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath( + project: string, + location: string, + lake: string, + task: string, + job: string + ) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project: string, location: string, lake: string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string, + partition: string + ) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath( + project: string, + location: string, + lake: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath( + project: string, + location: string, + lake: string, + zone: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render( + { + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + } + ); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).action; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project: string, location: string, lake: string, task: string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project: string, location: string, lake: string, zone: string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.metadataServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json b/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json new file mode 100644 index 00000000000..0afecc05d1f --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.MetadataService": { + "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": { + "GetEntity": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListEntities": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetPartition": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListPartitions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json new file mode 100644 index 00000000000..2f2fea78052 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..c6a9214b916 --- /dev/null +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// 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. +// +// ** 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 dataplex = require('@google-cloud/dataplex'); + +function main() { + const dataplexServiceClient = new dataplex.DataplexServiceClient(); + const metadataServiceClient = new dataplex.MetadataServiceClient(); +} + +main(); diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..81f502bd559 --- /dev/null +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,41 @@ +// 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. +// +// ** 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 { + DataplexServiceClient, + MetadataServiceClient, +} from '@google-cloud/dataplex'; + +// check that the client class type name can be used +function doStuffWithDataplexServiceClient(client: DataplexServiceClient) { + client.close(); +} +function doStuffWithMetadataServiceClient(client: MetadataServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const dataplexServiceClient = new DataplexServiceClient(); + doStuffWithDataplexServiceClient(dataplexServiceClient); + // check that the client instance can be created + const metadataServiceClient = new MetadataServiceClient(); + doStuffWithMetadataServiceClient(metadataServiceClient); +} + +main(); diff --git a/packages/google-cloud-dataplex/system-test/install.ts b/packages/google-cloud-dataplex/system-test/install.ts new file mode 100644 index 00000000000..6dd1eaadafa --- /dev/null +++ b/packages/google-cloud-dataplex/system-test/install.ts @@ -0,0 +1,51 @@ +// 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. +// +// ** 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-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts new file mode 100644 index 00000000000..a573dce9786 --- /dev/null +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -0,0 +1,6341 @@ +// 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. +// +// ** 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 dataplexserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataplexServiceClient', () => { + it('has servicePath', () => { + const servicePath = + dataplexserviceModule.v1.DataplexServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + dataplexserviceModule.v1.DataplexServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dataplexserviceModule.v1.DataplexServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataplexServiceStub, undefined); + await client.initialize(); + assert(client.dataplexServiceStub); + }); + + it('has close method', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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 dataplexserviceModule.v1.DataplexServiceClient({ + 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('getLake', () => { + it('invokes getLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Lake() + ); + client.innerApiCalls.getLake = stubSimpleCall(expectedResponse); + const [response] = await client.getLake(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Lake() + ); + client.innerApiCalls.getLake = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLake( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ILake | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getLake with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getLake = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLake(request), expectedError); + assert( + (client.innerApiCalls.getLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getZone', () => { + it('invokes getZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Zone() + ); + client.innerApiCalls.getZone = stubSimpleCall(expectedResponse); + const [response] = await client.getZone(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Zone() + ); + client.innerApiCalls.getZone = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getZone( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IZone | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getZone with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getZone = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getZone(request), expectedError); + assert( + (client.innerApiCalls.getZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getAsset', () => { + it('invokes getAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Asset() + ); + client.innerApiCalls.getAsset = stubSimpleCall(expectedResponse); + const [response] = await client.getAsset(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Asset() + ); + client.innerApiCalls.getAsset = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAsset( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAsset | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getAsset with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getAsset = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAsset(request), expectedError); + assert( + (client.innerApiCalls.getAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getTask', () => { + it('invokes getTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Task() + ); + client.innerApiCalls.getTask = stubSimpleCall(expectedResponse); + const [response] = await client.getTask(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Task() + ); + client.innerApiCalls.getTask = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTask( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ITask | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getTask with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTask(request), expectedError); + assert( + (client.innerApiCalls.getTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getJob', () => { + it('invokes getJob without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Job() + ); + client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); + const [response] = await client.getJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getJob without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Job() + ); + client.innerApiCalls.getJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getJob with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJob(request), expectedError); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('cancelJob', () => { + it('invokes cancelJob without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelJob = stubSimpleCall(expectedResponse); + const [response] = await client.cancelJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelJob without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelJob( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelJob with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelJob(request), expectedError); + assert( + (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createLake', () => { + it('invokes createLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.createLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLake = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createLake( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createLake = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createLake(request), expectedError); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createLake = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createLake(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateLakeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateLake', () => { + it('invokes updateLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateLake = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateLake( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLake = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateLake(request), expectedError); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLake = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateLake(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateLakeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteLake', () => { + it('invokes deleteLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLake = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteLake( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLake = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteLake(request), expectedError); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLake = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteLake(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteLakeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createZone', () => { + it('invokes createZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.createZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createZone = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createZone( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createZone = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createZone(request), expectedError); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createZone = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createZone(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateZoneProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateZone', () => { + it('invokes updateZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateZone = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateZone( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateZone = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateZone(request), expectedError); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateZone = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateZone(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateZoneProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteZone', () => { + it('invokes deleteZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteZone = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteZone( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteZone = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteZone(request), expectedError); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteZone = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteZone(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteZoneProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createAsset', () => { + it('invokes createAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAsset( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createAsset = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createAsset(request), expectedError); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createAsset(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateAsset', () => { + it('invokes updateAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAsset = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAsset( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAsset = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateAsset(request), expectedError); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateAsset(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteAsset', () => { + it('invokes deleteAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAsset( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAsset(request), expectedError); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteAsset(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createTask', () => { + it('invokes createTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.createTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTask = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTask( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTask = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createTask(request), expectedError); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTask = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createTask(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateTaskProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateTask', () => { + it('invokes updateTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTask = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTask( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTask = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateTask(request), expectedError); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTask = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateTask(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateTaskProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteTask', () => { + it('invokes deleteTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTask = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTask( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTask = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteTask(request), expectedError); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTask = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteTask(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteTaskProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listLakes', () => { + it('invokes listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = stubSimpleCall(expectedResponse); + const [response] = await client.listLakes(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakes without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakes( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ILake[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listLakes(request), expectedError); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + 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.listLakes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakes, request) + ); + assert.strictEqual( + (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listLakesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakes, request) + ); + assert.strictEqual( + (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + const iterable = client.listLakesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listLakesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listLakeActions', () => { + it('invokes listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = stubSimpleCall(expectedResponse); + const [response] = await client.listLakeActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakeActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakeActions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAction[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakeActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listLakeActions(request), expectedError); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakeActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + 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.listLakeActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakeActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listLakeActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakeActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listLakeActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLakeActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listZones', () => { + it('invokes listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = stubSimpleCall(expectedResponse); + const [response] = await client.listZones(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZones without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listZones( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IZone[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listZones with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listZones = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listZones(request), expectedError); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZonesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + 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.listZones.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZones, request) + ); + assert.strictEqual( + (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listZonesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZones.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZones, request) + ); + assert.strictEqual( + (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + const iterable = client.listZonesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZones with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listZonesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listZoneActions', () => { + it('invokes listZoneActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listZoneActions = stubSimpleCall(expectedResponse); + const [response] = await client.listZoneActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZoneActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listZoneActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listZoneActions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAction[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listZoneActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listZoneActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listZoneActions(request), expectedError); + assert( + (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZoneActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listZoneActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listZoneActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + 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.listZoneActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZoneActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listZoneActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZoneActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listZoneActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZoneActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZoneActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listZoneActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listZoneActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZoneActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZoneActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listZoneActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listAssets', () => { + it('invokes listAssets without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); + const [response] = await client.listAssets(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssets without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.innerApiCalls.listAssets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAssets( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAsset[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listAssets with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listAssets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAssets(request), expectedError); + assert( + (client.innerApiCalls.listAssets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssetsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.descriptors.page.listAssets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + 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.listAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssets, request) + ); + assert.strictEqual( + (client.descriptors.page.listAssets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listAssetsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssets, request) + ); + assert.strictEqual( + (client.descriptors.page.listAssets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssets without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.descriptors.page.listAssets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + const iterable = client.listAssetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssets with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listAssetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listAssetActions', () => { + it('invokes listAssetActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listAssetActions = stubSimpleCall(expectedResponse); + const [response] = await client.listAssetActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssetActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listAssetActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAssetActions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAction[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listAssetActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listAssetActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAssetActions(request), expectedError); + assert( + (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssetActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listAssetActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAssetActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + 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.listAssetActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssetActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listAssetActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssetActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAssetActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssetActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssetActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listAssetActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listAssetActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssetActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssetActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAssetActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listTasks', () => { + it('invokes listTasks without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.innerApiCalls.listTasks = stubSimpleCall(expectedResponse); + const [response] = await client.listTasks(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTasks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTasks without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.innerApiCalls.listTasks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTasks( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ITask[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTasks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listTasks with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTasks(request), expectedError); + assert( + (client.innerApiCalls.listTasks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTasksStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.descriptors.page.listTasks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { + 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.listTasks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTasks, request) + ); + assert.strictEqual( + (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listTasksStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listTasks.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTasks, request) + ); + assert.strictEqual( + (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTasks without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.descriptors.page.listTasks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + const iterable = client.listTasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTasks with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listTasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listJobs', () => { + it('invokes listJobs without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listJobs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobs without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.innerApiCalls.listJobs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IJob[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listJobs with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listJobs(request), expectedError); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.descriptors.page.listJobs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + 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.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listJobsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.descriptors.page.listJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + const iterable = client.listJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('asset', () => { + const fakePath = '/rendered/path/asset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.assetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entity', () => { + const fakePath = '/rendered/path/entity'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + job: 'jobValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.lakePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath( + 'projectValue', + 'locationValue', + 'lakeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('partition', () => { + const fakePath = '/rendered/path/partition'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + partition: 'partitionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue', + 'partitionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, 'partitionValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = '/rendered/path/projectLocationLakeAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + action: 'actionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = + client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + action: 'actionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + action: 'actionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('task', () => { + const fakePath = '/rendered/path/task'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.taskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('zone', () => { + const fakePath = '/rendered/path/zone'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.zonePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts new file mode 100644 index 00000000000..56decc46b4c --- /dev/null +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -0,0 +1,1897 @@ +// 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. +// +// ** 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 metadataserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.MetadataServiceClient', () => { + it('has servicePath', () => { + const servicePath = + metadataserviceModule.v1.MetadataServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + metadataserviceModule.v1.MetadataServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = metadataserviceModule.v1.MetadataServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metadataServiceStub, undefined); + await client.initialize(); + assert(client.metadataServiceStub); + }); + + it('has close method', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + 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 metadataserviceModule.v1.MetadataServiceClient({ + 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('getEntity', () => { + it('invokes getEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = stubSimpleCall(expectedResponse); + const [response] = await client.getEntity(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEntity( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntity | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEntity = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEntity(request), expectedError); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getPartition', () => { + it('invokes getPartition without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.getPartition = stubSimpleCall(expectedResponse); + const [response] = await client.getPartition(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getPartition without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.getPartition = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPartition( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IPartition | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getPartition with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getPartition = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPartition(request), expectedError); + assert( + (client.innerApiCalls.getPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listEntities', () => { + it('invokes listEntities without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.innerApiCalls.listEntities = stubSimpleCall(expectedResponse); + const [response] = await client.listEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEntities without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.innerApiCalls.listEntities = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEntities( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntity[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listEntities with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listEntities = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listEntities(request), expectedError); + assert( + (client.innerApiCalls.listEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEntitiesStream without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.descriptors.page.listEntities.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Entity[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Entity) => { + 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.listEntities.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEntities, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listEntitiesStream with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEntities.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Entity[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Entity) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEntities, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEntities without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.descriptors.page.listEntities.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; + const iterable = client.listEntitiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEntities with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEntities.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEntitiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listPartitions', () => { + it('invokes listPartitions without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.innerApiCalls.listPartitions = stubSimpleCall(expectedResponse); + const [response] = await client.listPartitions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPartitions without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.innerApiCalls.listPartitions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPartitions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IPartition[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listPartitions with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listPartitions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listPartitions(request), expectedError); + assert( + (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPartitionsStream without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.descriptors.page.listPartitions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPartitionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Partition[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Partition) => { + 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.listPartitions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPartitions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listPartitionsStream with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPartitions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPartitionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Partition[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Partition) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPartitions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPartitions without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.descriptors.page.listPartitions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; + const iterable = client.listPartitionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPartitions with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPartitions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPartitionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('asset', () => { + const fakePath = '/rendered/path/asset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.assetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entity', () => { + const fakePath = '/rendered/path/entity'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + job: 'jobValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.lakePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath( + 'projectValue', + 'locationValue', + 'lakeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('partition', () => { + const fakePath = '/rendered/path/partition'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + partition: 'partitionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue', + 'partitionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, 'partitionValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = '/rendered/path/projectLocationLakeAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + action: 'actionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = + client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + action: 'actionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + action: 'actionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('task', () => { + const fakePath = '/rendered/path/task'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.taskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('zone', () => { + const fakePath = '/rendered/path/zone'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.zonePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataplex/tsconfig.json b/packages/google-cloud-dataplex/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-dataplex/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-dataplex/webpack.config.js b/packages/google-cloud-dataplex/webpack.config.js new file mode 100644 index 00000000000..6967b216cde --- /dev/null +++ b/packages/google-cloud-dataplex/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: 'DataplexService', + filename: './dataplex-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +};