diff --git a/packages/google-cloud-geminidataanalytics/.OwlBot.yaml b/packages/google-cloud-geminidataanalytics/.OwlBot.yaml new file mode 100644 index 000000000000..6828edb7cb4f --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deep-copy-regex: + - source: /google/cloud/geminidataanalytics/google-cloud-geminidataanalytics-nodejs + dest: /owl-bot-staging/google-cloud-geminidataanalytics + +api-name: geminidataanalytics diff --git a/packages/google-cloud-geminidataanalytics/.eslintignore b/packages/google-cloud-geminidataanalytics/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/packages/google-cloud-geminidataanalytics/.eslintrc.json b/packages/google-cloud-geminidataanalytics/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-geminidataanalytics/.gitattributes b/packages/google-cloud-geminidataanalytics/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.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-geminidataanalytics/.gitignore b/packages/google-cloud-geminidataanalytics/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.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-geminidataanalytics/.jsdoc.js b/packages/google-cloud-geminidataanalytics/.jsdoc.js new file mode 100644 index 000000000000..eb80db58176c --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/geminidataanalytics', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-geminidataanalytics/.mocharc.js b/packages/google-cloud-geminidataanalytics/.mocharc.js new file mode 100644 index 000000000000..24e9d15257f9 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-geminidataanalytics/.nycrc b/packages/google-cloud-geminidataanalytics/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/packages/google-cloud-geminidataanalytics/.prettierignore b/packages/google-cloud-geminidataanalytics/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-geminidataanalytics/.prettierrc.js b/packages/google-cloud-geminidataanalytics/.prettierrc.js new file mode 100644 index 000000000000..d89a632f90b0 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-geminidataanalytics/.repo-metadata.json b/packages/google-cloud-geminidataanalytics/.repo-metadata.json new file mode 100644 index 000000000000..4ec127807b7c --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "geminidataanalytics", + "name_pretty": "Data Analytics API with Gemini", + "product_documentation": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/geminidataanalytics/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/geminidataanalytics", + "api_id": "geminidataanalytics.googleapis.com", + "default_version": "v1beta", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "geminidataanalytics" +} + diff --git a/packages/google-cloud-geminidataanalytics/CODE_OF_CONDUCT.md b/packages/google-cloud-geminidataanalytics/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/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-geminidataanalytics/CONTRIBUTING.md b/packages/google-cloud-geminidataanalytics/CONTRIBUTING.md new file mode 100644 index 000000000000..bca2caebdc76 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/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 Geminidataanalytics 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=geminidataanalytics.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-geminidataanalytics/LICENSE b/packages/google-cloud-geminidataanalytics/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/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-geminidataanalytics/README.md b/packages/google-cloud-geminidataanalytics/README.md new file mode 100644 index 000000000000..998a76f6a4f1 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/README.md @@ -0,0 +1,141 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Data Analytics API with Gemini: Nodejs Client][homepage] + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + +[![npm version](https://img.shields.io/npm/v/@google-cloud/geminidataanalytics.svg)](https://www.npmjs.org/package/@google-cloud/geminidataanalytics) + +Data Analytics API with Gemini client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Data Analytics API with Gemini Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/geminidataanalytics/latest) +* [Data Analytics API with Gemini Documentation](https://cloud.google.com/gemini/docs/conversational-analytics-api/overview) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Data Analytics API with Gemini API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/geminidataanalytics +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| create data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.create_data_agent.js) | +| delete data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.delete_data_agent.js) | +| get data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_data_agent.js) | +| get iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_iam_policy.js) | +| list accessible data agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_accessible_data_agents.js) | +| list data agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_data_agents.js) | +| set iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.set_iam_policy.js) | +| update data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.update_data_agent.js) | +| chat | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.chat.js) | +| create conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.create_conversation.js) | +| delete conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.delete_conversation.js) | +| get conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.get_conversation.js) | +| list conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_conversations.js) | +| list messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_messages.js) | +| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/snippet_metadata_google.cloud.geminidataanalytics.v1alpha.json) | +| create data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.create_data_agent.js) | +| delete data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.delete_data_agent.js) | +| get data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_data_agent.js) | +| get iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_iam_policy.js) | +| list accessible data agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_accessible_data_agents.js) | +| list data agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_data_agents.js) | +| set iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.set_iam_policy.js) | +| update data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.update_data_agent.js) | +| chat | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.chat.js) | +| create conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.create_conversation.js) | +| get conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.get_conversation.js) | +| list conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_conversations.js) | +| list messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_messages.js) | +| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/geminidataanalytics@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=geminidataanalytics.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics diff --git a/packages/google-cloud-geminidataanalytics/package.json b/packages/google-cloud-geminidataanalytics/package.json new file mode 100644 index 000000000000..acdffea27dc4 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/package.json @@ -0,0 +1,70 @@ +{ + "name": "@google-cloud/geminidataanalytics", + "version": "0.0.0", + "description": "Data Analytics API with Gemini client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-cloud-geminidataanalytics" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-geminidataanalytics", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google geminidataanalytics", + "geminidataanalytics", + "Data Analytics API with Gemini" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "postpack": "minifyProtoJson", + "prepare": "npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^5.0.0" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.13.9", + "@types/sinon": "^17.0.4", + "c8": "^10.1.3", + "gapic-tools": "^1.0.0", + "gts": "^6.0.2", + "jsdoc": "^4.0.4", + "jsdoc-fresh": "^4.0.0", + "jsdoc-region-tag": "^3.0.0", + "linkinator": "^6.1.2", + "long": "^5.3.1", + "mocha": "^11.1.0", + "pack-n-play": "^3.0.0", + "sinon": "^21.0.0", + "typescript": "^5.8.2" + }, + "engines": { + "node": ">=18.0.0" + } +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/context.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/context.proto new file mode 100644 index 000000000000..ad72289556b1 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/context.proto @@ -0,0 +1,192 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/cloud/geminidataanalytics/v1alpha/datasource.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "ContextProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// A collection of context to apply to this conversation +message Context { + // The relationship between two tables, including referencing and referenced + // columns. This is a derived context retrieved from Dataplex Dataset + // Insights. + message SchemaRelationship { + // Represents an ordered set of paths within the table schema. + message SchemaPaths { + // The service-qualified full resource name of the table + // Ex: + // bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + string table_fqn = 1; + + // The ordered list of paths within the table schema. + repeated string paths = 2; + } + + // Source which generated the schema relation edge. + enum Source { + // The source of the schema relationship is unspecified. + SOURCE_UNSPECIFIED = 0; + + // The source of the schema relationship is BigQuery job history. + BIGQUERY_JOB_HISTORY = 1; + + // The source of the schema relationship is LLM suggested. + LLM_SUGGESTED = 2; + + // The source of the schema relationship is BigQuery table constraints. + BIGQUERY_TABLE_CONSTRAINTS = 3; + } + + // An ordered list of fields for the join from the first table. + // The size of this list must be the same as `right_schema_paths`. + // Each field at index i in this list must correspond to a field at the same + // index in the `right_schema_paths` list. + SchemaPaths left_schema_paths = 1; + + // An ordered list of fields for the join from the second table. + // The size of this list must be the same as `left_schema_paths`. + // Each field at index i in this list must correspond to a field at the same + // index in the `left_schema_paths` list. + SchemaPaths right_schema_paths = 2; + + // Sources which generated the schema relation edge. + repeated Source sources = 3; + + // A confidence score for the suggested relationship. + // Manually added edges have the highest confidence score. + float confidence_score = 4; + } + + // Optional. The basic entry point for data owners creating domain knowledge + // for Agent. + // + // Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age + // is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate) + // can help the model understand the business context around a user question. + string system_instruction = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Data sources that are available for answering the question. + DatasourceReferences datasource_references = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Additional options for the conversation. + ConversationOptions options = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of example queries, providing examples of relevant and + // commonly used SQL queries and their corresponding natural language queries + // optionally present. Currently only used for BigQuery data sources. + repeated ExampleQuery example_queries = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Term definitions (currently, only user authored) + repeated GlossaryTerm glossary_terms = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Relationships between table schema, including referencing and + // referenced columns. + repeated SchemaRelationship schema_relationships = 9 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Example of relevant and commonly used SQL query and its corresponding natural +// language queries optionally present. Currently only used for BigQuery data +// sources. +message ExampleQuery { + // The SQL or Looker query that should be generated to answer the natural + // language query. + oneof query { + // Optional. The SQL query that should be generated to answer the natural + // language question. For example: "SELECT COUNT(*) FROM orders WHERE + // order_date BETWEEN '2024-01-01' AND '2024-01-31'" + string sql_query = 101 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A natural language question that a user might ask. + // For example: "How many orders were placed last month?" + string natural_language_question = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Definition of a term within a specific domain. +message GlossaryTerm { + // Required. User friendly display name of the glossary term being defined. + // For example: "CTR", "conversion rate", "pending" + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The description or meaning of the term. + // For example: "Click-through rate", "The percentage of users who complete a + // desired action", "An order that is waiting to be processed." + string description = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of general purpose labels associated to this term. + // For example: ["click rate", "clickthrough", "waiting"] + repeated string labels = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for the conversation. +message ConversationOptions { + // Optional. Options for chart generation. + ChartOptions chart = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Options for analysis. + AnalysisOptions analysis = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for chart generation. +message ChartOptions { + // Options for rendering images of generated charts. + message ImageOptions { + // No image. + message NoImage {} + + // SVG options. + message SvgOptions {} + + // The kind of image to render. + oneof kind { + // No image. + NoImage no_image = 1; + + // SVG format. + SvgOptions svg = 2; + } + } + + // Optional. When specified, the agent will render generated charts using the + // provided format. Defaults to no image. + ImageOptions image = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for analysis. +message AnalysisOptions { + // Options for Python analysis. + message Python { + // Optional. Whether to enable Python analysis. + // Defaults to false. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Options for Python analysis. + Python python = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/conversation.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/conversation.proto new file mode 100644 index 000000000000..a9936ab1f6df --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/conversation.proto @@ -0,0 +1,167 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "ConversationProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// Message for a conversation. +message Conversation { + option (google.api.resource) = { + type: "geminidataanalytics.googleapis.com/Conversation" + pattern: "projects/{project}/locations/{location}/conversations/{conversation}" + plural: "conversations" + singular: "conversation" + }; + + // Optional. Identifier. The unique resource name of a conversation. Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + // `{conversation_id}` is the resource id and should be 63 characters or less + // and must match the format described in + // https://google.aip.dev/122#resource-id-segments + // + // Example: + // `projects/1234567890/locations/global/conversations/my-conversation`. + // + // It is recommended to skip setting this field during conversation creation + // as it will be inferred automatically and overwritten with the + // {parent}/conversations/{conversation_id}. + string name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Required. Agent(s) in the conversation. + // Currently, only one agent is supported. This field is repeated to allow + // for future support of multiple agents in a conversation. + // Format: `projects/{project}/locations/{location}/dataAgents/{agent}` + repeated string agents = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last used conversation. + google.protobuf.Timestamp last_used_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Open-ended and user-defined labels that can be set by the client + // to tag a conversation (e.g. to filter conversations for specific + // surfaces/products). + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for creating a conversation. +message CreateConversationRequest { + // Required. Parent value for CreateConversationRequest. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. The conversation id of the conversation to create. + // Must be unique within the parent. + // The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + // If not provided, the server will auto-generate a value for the id. + string conversation_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The conversation to create. + Conversation conversation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request for getting a conversation based on parent and conversation id. +message GetConversationRequest { + // Required. Name of the resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; +} + +// Request for listing conversations based on parent. +message ListConversationsRequest { + // Required. Parent value for ListConversationsRequest. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. The max page size is 100. All larger page sizes will be coerced + // to 100. If unspecified, server will pick 50 as an approperiate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Returned conversations will match criteria specified within the + // filter. ListConversations allows filtering by: + // * agents + // * labels + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing conversations. +message ListConversationsResponse { + // The list of conversations. + repeated Conversation conversations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Request for deleting a conversation based on parent and conversation id. +message DeleteConversationRequest { + // Required. Name of the resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/credentials.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/credentials.proto new file mode 100644 index 000000000000..fdd6195fa5b1 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/credentials.proto @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "CredentialsProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// Represents different forms of credential specification. +message Credentials { + // The kind of credentials. + // } + oneof kind { + // OAuth credentials. + OAuthCredentials oauth = 1; + } +} + +// Represents OAuth credentials. +message OAuthCredentials { + // The name of the secret containing the access token. + // Represents secret-based OAuth credentials. + message SecretBased { + // Required. An OAuth client ID. + string client_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. An OAuth client secret. + string client_secret = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Read more about Looker access tokens here: + // https://developers.looker.com/api/advanced-usage/looker-api-oauth + message TokenBased { + // Required. The name of the secret containing the access token. + string access_token = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The kind of OAuth credentials. + oneof kind { + // Secret-based OAuth credentials. + SecretBased secret = 2; + + // Token-based OAuth credentials. + TokenBased token = 3; + } +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_agent.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_agent.proto new file mode 100644 index 000000000000..632ed53a410b --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_agent.proto @@ -0,0 +1,101 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1alpha/data_analytics_agent.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAgentProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// Message describing a DataAgent object. +message DataAgent { + option (google.api.resource) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + pattern: "projects/{project}/locations/{location}/dataAgents/{data_agent}" + plural: "dataAgents" + singular: "dataAgent" + }; + + // The type of the agent. Can be one of the following: + // * Data analytics agent. + // * Data engineering agent + oneof type { + // Data analytics agent. + DataAnalyticsAgent data_analytics_agent = 101; + } + + // Optional. Identifier. The unique resource name of a DataAgent. + // Format: + // `projects/{project}/locations/{location}/dataAgents/{data_agent_id}` + // `{data_agent}` is the resource id and should be 63 characters or less and + // must match the format described in + // https://google.aip.dev/122#resource-id-segments + // + // Example: `projects/1234567890/locations/global/dataAgents/my-agent`. + // + // It is recommended to skip setting this field during agent creation as it + // will be inferred automatically and overwritten with the + // {parent}/dataAgents/{data_agent_id}. + string name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. User friendly display name. + // + // * Must be between 1-256 characters. + string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the agent. + // + // * Must be between 1-1024 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to help users filter related agents. + // For example, "sales", "business", "etl", and so on. + // Note labels are used only for filtering and not for policies. + // See the [labels + // documentation](https://cloud.google.com/resource-manager/docs/labels-overview) + // for more details on label usage. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the data agent was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the data agent was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] The time the data agent was soft deleted. + google.protobuf.Timestamp delete_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp in UTC of when this data agent is considered + // expired. This is *always* provided on output, regardless of what was sent + // on input. + google.protobuf.Timestamp purge_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_agent_service.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_agent_service.proto new file mode 100644 index 000000000000..76a6df6858b8 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_agent_service.proto @@ -0,0 +1,385 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1alpha/data_agent.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAgentServiceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// Service describing handlers for resources. +service DataAgentService { + option (google.api.default_host) = "geminidataanalytics.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists DataAgents in a given project and location. + rpc ListDataAgents(ListDataAgentsRequest) returns (ListDataAgentsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/dataAgents" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists DataAgents that are accessible to the caller in a given project and + // location. + rpc ListAccessibleDataAgents(ListAccessibleDataAgentsRequest) + returns (ListAccessibleDataAgentsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/dataAgents:listAccessible" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DataAgent. + rpc GetDataAgent(GetDataAgentRequest) returns (DataAgent) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/dataAgents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new DataAgent in a given project and location. + rpc CreateDataAgent(CreateDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/dataAgents" + body: "data_agent" + }; + option (google.api.method_signature) = "parent,data_agent,data_agent_id"; + option (google.longrunning.operation_info) = { + response_type: "DataAgent" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single DataAgent. + rpc UpdateDataAgent(UpdateDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{data_agent.name=projects/*/locations/*/dataAgents/*}" + body: "data_agent" + }; + option (google.api.method_signature) = "data_agent,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataAgent" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single DataAgent. + rpc DeleteDataAgent(DeleteDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/dataAgents/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets the IAM policy for DataAgent + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1alpha/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the IAM policy for a DataAgent. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1alpha/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } +} + +// Message for requesting list of DataAgents. +message ListDataAgentsRequest { + // Required. Parent value for ListDataAgentsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataAgents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDataAgents` must + // match the call that provided the page token. The service may return fewer + // than this value. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User specification for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the list results will include soft-deleted DataAgents. + // Defaults to false. + bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing DataAgents. +message ListDataAgentsResponse { + // The list of DataAgent. + repeated DataAgent data_agents = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for requesting list of accessible DataAgents. +message ListAccessibleDataAgentsRequest { + // Filter for the creator of the agent. + enum CreatorFilter { + // Default value. + CREATOR_FILTER_UNSPECIFIED = 0; + + // No creator-specific filter will be applied. All agents will be returned. + NONE = 1; + + // Only agents created by the user calling the API will be returned. + CREATOR_ONLY = 2; + + // Only agents not created by the user calling the API will be returned. + NOT_CREATOR_ONLY = 3; + } + + // Required. Parent value for ListAccessibleDataAgentsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAccessibleDataAgents` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListAccessibleDataAgents` must match the call that provided the page + // token. The service may return fewer than this value. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User specification for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the list results will include soft-deleted DataAgents. + // Defaults to false. + bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the creator of the agent. + CreatorFilter creator_filter = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing accessible DataAgents. +message ListAccessibleDataAgentsResponse { + // The list of accessible DataAgent. + repeated DataAgent data_agents = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for getting a DataAgent. +message GetDataAgentRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; +} + +// Message for creating a DataAgent. +message CreateDataAgentRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Id of the requesting object. Must be unique within the parent. + // The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + // If not provided, the server will auto-generate a value for the id. + string data_agent_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being created. + DataAgent data_agent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a DataAgent. +message UpdateDataAgentRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // DataAgent resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields with non-default values + // present in the request will be overwritten. If a wildcard mask is provided, + // all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated. + DataAgent data_agent = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a DataAgent. +message DeleteDataAgentRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_analytics_agent.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_analytics_agent.proto new file mode 100644 index 000000000000..69dbc96a6169 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_analytics_agent.proto @@ -0,0 +1,46 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/cloud/geminidataanalytics/v1alpha/context.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAnalyticsAgentProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// Message describing a DataAnalyticsAgent object. +message DataAnalyticsAgent { + // Optional. The staging context for the agent. + // This context is used to test and validate changes before publishing. + Context staging_context = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The published context for the agent. + // This context is used by the Chat API in production. + Context published_context = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The last published context for the agent. + // This is an output-only field populated by the system when the + // published context is updated. It is used to restore the agent to a + // previous state. + Context last_published_context = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto new file mode 100644 index 000000000000..ab3bf466e1a3 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto @@ -0,0 +1,605 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1alpha/context.proto"; +import "google/cloud/geminidataanalytics/v1alpha/conversation.proto"; +import "google/cloud/geminidataanalytics/v1alpha/credentials.proto"; +import "google/cloud/geminidataanalytics/v1alpha/datasource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataChatServiceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// Service to ask a natural language question on top of BigQuery +// and Looker Studio datasources to get back streamed responses of various kinds +// to help provide a rich conversational answer. +service DataChatService { + option (google.api.default_host) = "geminidataanalytics.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Answers a data question by generating a stream of + // [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. + rpc Chat(ChatRequest) returns (stream Message) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}:chat" + body: "*" + }; + } + + // Creates a new conversation to persist the conversation history. Each + // conversation will have multiple messages associated with it. + rpc CreateConversation(CreateConversationRequest) returns (Conversation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/conversations" + body: "conversation" + }; + option (google.api.method_signature) = + "parent,conversation,conversation_id"; + } + + // Deletes a conversation. + rpc DeleteConversation(DeleteConversationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/conversations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets details of a single conversation by using conversation id and parent. + rpc GetConversation(GetConversationRequest) returns (Conversation) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/conversations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all conversations for a given parent. + rpc ListConversations(ListConversationsRequest) + returns (ListConversationsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/conversations" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all messages for a given conversation. + rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/conversations/*}/messages" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request for listing chat messages based on parent and conversation_id. +message ListMessagesRequest { + // Required. The conversation to list messages under. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. The max page size is 100. All larger page sizes will be coerced + // to 100. If unspecified, server will pick 50 as an approperiate default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + // + // ListMessages allows filtering by: + // * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + // * update_time + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing chat messages. +message ListMessagesResponse { + // The list of chat messages. + repeated StorageMessage messages = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// A stored message containing user message or system message. +message StorageMessage { + // The unique resource name of a chat message. + string message_id = 1; + + // The message content. + Message message = 2; +} + +// Request for Chat. +message ChatRequest { + // Context Provider for the chat request. + // It can either be - + // inline_context, which is a context provided inline in the request. + // data_agent, which is a reference to a data agent resource. + // conversation_reference, which is a reference to a persisted conversation + // and context using conversation_id and agent_id. + oneof context_provider { + // Optional. Inline context for the chat request. Use this to chat + // statelessly (without managed conversation persistence and without an + // Agent) by passing all context inline. + Context inline_context = 101 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reference to a persisted conversation and agent context. + // Use this to chat with an Agent using managed conversation persistence. + ConversationReference conversation_reference = 103 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Context for the chat request. Use this to chat with an Agent + // statelessly, without managed conversation persistence. + DataAgentContext data_agent_context = 104 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The Google Cloud project to be used for quota and billing. + string project = 1 [ + deprecated = true, + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The parent value for chat request. + // Pattern: `projects/{project}/locations/{location}` + string parent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Content of current conversation. + repeated Message messages = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Context for the chat request using a data agent. +message DataAgentContext { + // List of context versions supported by DCS. + // There are two versions of context. This is to maintain versioning for the + // data agent. + enum ContextVersion { + // Unspecified or unrecognized. + CONTEXT_VERSION_UNSPECIFIED = 0; + + // Using this version, DCS will use the latest staging context for the + // data agent. + STAGING = 1; + + // Using this version, DCS will use the latest published context for the + // data agent. + PUBLISHED = 2; + } + + // Required. The name of the data agent resource. + string data_agent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. The credentials to use when calling the Looker data source. + // + // Currently supports both OAuth token and API key-based credentials, as + // described in + // [Authentication with an + // SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). + Credentials credentials = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED) + ContextVersion context_version = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Reference to a persisted conversation and agent context. +message ConversationReference { + // Required. Name of the conversation resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + string conversation = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Required. Context for the chat request using a data agent. + DataAgentContext data_agent_context = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// A message from an interaction between the user and the system. +message Message { + // The kind of message. + oneof kind { + // A message from the user that is interacting with the system. + UserMessage user_message = 2; + + // A message from the system in response to the user. + SystemMessage system_message = 3; + } + + // Output only. For user messages, this is the time at which the system + // received the message. For system messages, this is the time at which the + // system generated the message. + google.protobuf.Timestamp timestamp = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. unique id of the message in the conversation for persistence. + string message_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message from the user that is interacting with the system. +message UserMessage { + // The kind of content in the user message. + oneof kind { + // Text should use this field instead of blob. + string text = 1; + } +} + +// A message from the system in response to the user. This message can also be a +// message from the user as historical context for multiturn conversations with +// the system. +message SystemMessage { + // The kind of content in the system message. + oneof kind { + // A direct natural language response to the user message. + TextMessage text = 1; + + // A message produced during schema resolution. + SchemaMessage schema = 2; + + // A message produced during data retrieval. + DataMessage data = 3; + + // A message produced during analysis. + AnalysisMessage analysis = 4; + + // A message produced during chart generation. + ChartMessage chart = 5; + + // An error message. + ErrorMessage error = 6; + + // Optional. A message containing example queries. + ExampleQueries example_queries = 13 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifies the group that the event belongs to. Similar events are deemed + // to be logically relevant to each other and should be shown together in + // the UI. + optional int32 group_id = 12; +} + +// A multi-part text message. +message TextMessage { + // The type of the text message. + enum TextType { + // The default text type. + TEXT_TYPE_UNSPECIFIED = 0; + + // The text is a final response to the user question. + FINAL_RESPONSE = 1; + + // The text is a thinking plan generated by the thinking tool. + THOUGHT = 2; + } + + // Optional. The parts of the message. + repeated string parts = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the text message. + TextType text_type = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during schema resolution. +message SchemaMessage { + // Whether this message contains the query or the result of the schema + // resolution. + oneof kind { + // A schema resolution query. + SchemaQuery query = 1; + + // The result of a schema resolution query. + SchemaResult result = 2; + } +} + +// A query for resolving the schema relevant to the posed question. +message SchemaQuery { + // Optional. The question to send to the system for schema resolution. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of schema resolution. +message SchemaResult { + // Optional. The datasources used to resolve the schema query. + repeated Datasource datasources = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during data retrieval. +message DataMessage { + // Whether this message contains the query, the result, or generated SQL for + // the data retrieval. + oneof kind { + // A data retrieval query. + DataQuery query = 1; + + // SQL generated by the system to retrieve data. + string generated_sql = 2; + + // Retrieved data. + DataResult result = 3; + + // Looker Query generated by the system to retrieve data. + // DEPRECATED: generated looker query is now under DataQuery.looker. + LookerQuery generated_looker_query = 4 [deprecated = true]; + + // A BigQuery job executed by the system to retrieve data. + BigQueryJob big_query_job = 5; + } +} + +// A query for retrieving data from a Looker Explore. See +// [Run Inline +// Query](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query). +message LookerQuery { + // A Looker query filter. + message Filter { + // Required. The field to filter on. + string field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value f field to filter on. + string value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. The LookML model used to generate the query. + string model = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The LookML Explore used to generate the query. + string explore = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The fields to retrieve from the Explore. + repeated string fields = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters to apply to the Explore. + repeated Filter filters = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sorts to apply to the Explore. + repeated string sorts = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limit in the query. + optional string limit = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A query for retrieving data. +message DataQuery { + // The type of query to execute. + oneof query_type { + // Optional. A query for retrieving data from a Looker explore. + LookerQuery looker = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A natural language question to answer. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A snake-case name for the query that reflects its intent. It is + // used to name the corresponding data result, so that it can be referenced in + // later steps. + // + // * Example: "total_sales_by_product" + // * Example: "sales_for_product_12345" + string name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The datasources available to answer the question. + repeated Datasource datasources = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Retrieved data. +message DataResult { + // Optional. A snake-case name for the data result that reflects its contents. + // The name is used to pass the result around by reference, and serves as a + // signal about its meaning. + // + // * Example: "total_sales_by_product" + // * Example: "sales_for_product_12345" + string name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The schema of the data. + Schema schema = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The content of the data. Each row is a struct that matches the + // schema. Simple values are represented as strings, while nested structures + // are represented as lists or structs. + repeated google.protobuf.Struct data = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A BigQuery job executed by the system. +message BigQueryJob { + // Required. The project that the job belongs to. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the job. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The location of the job. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string location = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A reference to the destination table of the job's query results. + // + // See + // [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery). + BigQueryTableReference destination_table = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The schema of the job's query results. + // + // See + // [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2). + Schema schema = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during analysis. +message AnalysisMessage { + // Whether this message contains the query or one of the events from the + // analysis. + oneof kind { + // An analysis query. + AnalysisQuery query = 1; + + // An event indicating the progress of the analysis. + AnalysisEvent progress_event = 2; + } +} + +// A query for performing an analysis. +message AnalysisQuery { + // Optional. An analysis question to help answer the user's original question. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The names of previously retrieved data results to analyze. + repeated string data_result_names = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An event indicating the progress of an analysis. +message AnalysisEvent { + // The kind of event that occurred during the analysis. + oneof kind { + // Python codegen planner's reasoning. + string planner_reasoning = 2; + + // Instructions issued for code generation. + string coder_instruction = 3; + + // Generated code. + string code = 4; + + // Output from code execution. + string execution_output = 5; + + // An error from code execution. + string execution_error = 6; + + // Result as Vega chart JSON string. + string result_vega_chart_json = 7; + + // Result as NL string. + string result_natural_language = 8; + + // Result as CSV string. + string result_csv_data = 9; + + // Result as a reference to a data source. + string result_reference_data = 10; + + // A generic error message. + string error = 11; + } +} + +// A message produced during chart generation. +message ChartMessage { + // Whether this message contains the query or the result of the chart + // generation. + oneof kind { + // A query for generating a chart. + ChartQuery query = 1; + + // The result of a chart generation query. + ChartResult result = 2; + } +} + +// A query for generating a chart. +message ChartQuery { + // Optional. Natural language instructions for generating the chart. + string instructions = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of a previously retrieved data result to use in the + // chart. + string data_result_name = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of a chart generation query. +message ChartResult { + // Optional. A generated Vega chart config. + // See https://vega.github.io/vega/docs/config/ + google.protobuf.Struct vega_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A rendering of the chart if this was requested in the context. + Blob image = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// An error message. +message ErrorMessage { + // Output only. The text of the error. + string text = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A message containing derived and authored example queries. +message ExampleQueries { + // Optional. A list of derived and authored example queries, providing + // examples of relevant and commonly used SQL queries and their corresponding + // natural language queries optionally present. Currently only used for + // BigQuery data sources. + repeated ExampleQuery example_queries = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A blob of data with a MIME type. +message Blob { + // Required. The IANA standard MIME type of the message data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The data represented as bytes. + bytes data = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/datasource.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/datasource.proto new file mode 100644 index 000000000000..61a445d67dea --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/datasource.proto @@ -0,0 +1,245 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/cloud/geminidataanalytics/v1alpha/credentials.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DatasourceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1alpha"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1alpha"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1alpha"; + +// The type of filter present on a datasource, such as ALWAYS_FILTER. +enum DataFilterType { + // The filter type was not specified. + DATA_FILTER_TYPE_UNSPECIFIED = 0; + + // A filter that the user configures, and any queries to the Explore will + // always apply this filter by default. Currently only used for Looker data + // sources. + ALWAYS_FILTER = 1; +} + +// A collection of references to datasources. +message DatasourceReferences { + // The datasources to use. + oneof references { + // References to BigQuery tables. + BigQueryTableReferences bq = 1; + + // References to Looker Studio datasources. + StudioDatasourceReferences studio = 2; + + // References to Looker Explores. + LookerExploreReferences looker = 3; + } +} + +// Message representing references to BigQuery tables. +message BigQueryTableReferences { + // Required. References to BigQuery tables. + repeated BigQueryTableReference table_references = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing a reference to a single BigQuery table. +message BigQueryTableReference { + // Required. The project that the table belongs to. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The dataset that the table belongs to. + string dataset_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table id. + string table_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema of the datasource. + Schema schema = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing references to Looker Studio datasources. +message StudioDatasourceReferences { + // The references to the studio datasources. + repeated StudioDatasourceReference studio_references = 2; +} + +// Message representing a reference to a single Looker Studio datasource. +message StudioDatasourceReference { + // Required. The id of the datasource. + string datasource_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing references to Looker explores. +message LookerExploreReferences { + // Required. References to Looker explores. + repeated LookerExploreReference explore_references = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The credentials to use when calling the Looker API. + // + // Currently supports both OAuth token and API key-based credentials, as + // described in + // [Authentication with an + // SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). + Credentials credentials = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing a reference to a single Looker explore. +message LookerExploreReference { + // The instance of the Looker explore. + oneof instance { + // Required. The base url of the Looker instance. + string looker_instance_uri = 9; + + // Private Looker instance info. + PrivateLookerInstanceInfo private_looker_instance_info = 10; + } + + // Required. Looker model, as outlined in + // [Major LookML + // structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + // Name of the LookML model. + string lookml_model = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Looker Explore, as outlined in + // [Major LookML + // structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + // Name of the LookML Explore. + string explore = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema of the datasource. + Schema schema = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing a private Looker instance info required if the Looker +// instance is behind a private network. +message PrivateLookerInstanceInfo { + // The Looker instance id. + string looker_instance_id = 1; + + // The service directory name of the Looker instance. + string service_directory_name = 2; +} + +// A datasource that can be used to answer questions. +message Datasource { + // The reference to the datasource. + oneof reference { + // A reference to a BigQuery table. + BigQueryTableReference bigquery_table_reference = 1; + + // A reference to a Looker Studio datasource. + string studio_datasource_id = 2; + + // A reference to a Looker explore. + LookerExploreReference looker_explore_reference = 4; + } + + // Optional. The schema of the datasource. + Schema schema = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The schema of a Datasource or QueryResult instance. +message Schema { + // Optional. The fields in the schema. + repeated Field fields = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A textual description of the table's content and purpose. + // For example: "Contains information about customer orders in our e-commerce + // store." Currently only used for BigQuery data sources. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of alternative names or synonyms that can be used to refer + // to the table. For example: ["sales", "orders", "purchases"]. Currently only + // used for BigQuery data sources. + repeated string synonyms = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of tags or keywords associated with the table, used for + // categorization. For example: ["transaction", "revenue", "customer_data"]. + // Currently only used for BigQuery data sources. + repeated string tags = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Table display_name (same as label in + // cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not + // required, currently only Looker has this field. + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters on the datasource's underlying data. Currently only + // used for Looker data sources. + repeated DataFilter filters = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A field in a schema. +message Field { + // Optional. The name of the field. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the field. + string type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A brief description of the field. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mode of the field (e.g., NULLABLE, REPEATED). + string mode = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of alternative names or synonyms that can be used to refer + // to this field. For example: ["id", "customerid", "cust_id"]. Currently only + // used for BigQuery data sources. + repeated string synonyms = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of tags or keywords associated with the field, used for + // categorization. For example: ["identifier", "customer", "pii"]. Currently + // only used for BigQuery data sources. + repeated string tags = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field display_name (same as label in + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Recursive property for nested schema structures. + repeated Field subfields = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field category, not required, currently only useful for Looker. + // We are using a string to avoid depending on an external package and keep + // this package self-contained. + string category = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Looker only. Value format of the field. + // Ref: + // https://cloud.google.com/looker/docs/reference/param-field-value-format + string value_format = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// A filter on a datasource's underlying data. Filter syntax documentation: +// https://cloud.google.com/looker/docs/filter-expressions +message DataFilter { + // Optional. The field to filter on. For example: ["event_date", + // "customer_id", "product_category"] + string field = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default value used for this filter if the filter is not + // overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"] + string value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of filter present on a datasource, such as + // ALWAYS_FILTER. + DataFilterType type = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/context.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/context.proto new file mode 100644 index 000000000000..c093e0a21515 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/context.proto @@ -0,0 +1,116 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/field_behavior.proto"; +import "google/cloud/geminidataanalytics/v1beta/datasource.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "ContextProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// A collection of context to apply to this conversation +message Context { + // Optional. The basic entry point for data owners creating domain knowledge + // for Agent. + // + // Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age + // is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate) + // can help the model understand the business context around a user question. + string system_instruction = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Data sources that are available for answering the question. + DatasourceReferences datasource_references = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Additional options for the conversation. + ConversationOptions options = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of example queries, providing examples of relevant and + // commonly used SQL queries and their corresponding natural language queries + // optionally present. + repeated ExampleQuery example_queries = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Example of relevant and commonly used SQL query and its corresponding natural +// language queries optionally present. +message ExampleQuery { + // The SQL or Looker query that should be generated to answer the natural + // language query. + oneof query { + // Optional. The SQL query that should be generated to answer the natural + // language question. For example: "SELECT COUNT(*) FROM orders WHERE + // order_date BETWEEN '2024-01-01' AND '2024-01-31'" + string sql_query = 101 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A natural language question that a user might ask. + // For example: "How many orders were placed last month?" + string natural_language_question = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for the conversation. +message ConversationOptions { + // Optional. Options for chart generation. + ChartOptions chart = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Options for analysis. + AnalysisOptions analysis = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for chart generation. +message ChartOptions { + // Options for rendering images of generated charts. + message ImageOptions { + // No image. + message NoImage {} + + // SVG options. + message SvgOptions {} + + // The kind of image to render. + oneof kind { + // No image. + NoImage no_image = 1; + + // SVG format. + SvgOptions svg = 2; + } + } + + // Optional. When specified, the agent will render generated charts using the + // provided format. Defaults to no image. + ImageOptions image = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for analysis. +message AnalysisOptions { + // Options for Python analysis. + message Python { + // Optional. Whether to enable Python analysis. + // Defaults to false. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Options for Python analysis. + Python python = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/conversation.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/conversation.proto new file mode 100644 index 000000000000..460733881c69 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/conversation.proto @@ -0,0 +1,154 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "ConversationProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// Message for a conversation. +message Conversation { + option (google.api.resource) = { + type: "geminidataanalytics.googleapis.com/Conversation" + pattern: "projects/{project}/locations/{location}/conversations/{conversation}" + plural: "conversations" + singular: "conversation" + }; + + // Optional. Identifier. The unique resource name of a conversation. Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + // `{conversation_id}` is the resource id and should be 63 characters or less + // and must match the format described in + // https://google.aip.dev/122#resource-id-segments + // + // Example: + // `projects/1234567890/locations/us-central1/conversations/my-conversation`. + // + // It is recommended to skip setting this field during conversation creation + // as it will be inferred automatically and overwritten with the + // {parent}/conversations/{conversation_id}. + string name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Required. Agent(s) in the conversation. + // Currently, only one agent is supported. This field is repeated to allow + // for future support of multiple agents in a conversation. + // Format: `projects/{project}/locations/{location}/dataAgents/{agent}` + repeated string agents = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Creation timestamp. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last used conversation. + google.protobuf.Timestamp last_used_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Open-ended and user-defined labels that can be set by the client + // to tag a conversation (e.g. to filter conversations for specific + // surfaces/products). + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for creating a conversation. +message CreateConversationRequest { + // Required. Parent value for CreateConversationRequest. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. The conversation id of the conversation to create. + // Must be unique within the parent. + // The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + // If not provided, the server will auto-generate a value for the id. + string conversation_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The conversation to create. + Conversation conversation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request for getting a conversation based on parent and conversation id. +message GetConversationRequest { + // Required. Name of the resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; +} + +// Request for listing conversations based on parent. +message ListConversationsRequest { + // Required. Parent value for ListConversationsRequest. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. The max page size is 100. All larger page sizes will be coerced + // to 100. If unspecified, server will pick 50 as an approperiate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Returned conversations will match criteria specified within the + // filter. ListConversations allows filtering by: + // * agent_id + // * labels + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing conversations. +message ListConversationsResponse { + // The list of conversations. + repeated Conversation conversations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/credentials.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/credentials.proto new file mode 100644 index 000000000000..bb214f5d5cbe --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/credentials.proto @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "CredentialsProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// Represents different forms of credential specification. +message Credentials { + // The kind of credentials. + // } + oneof kind { + // OAuth credentials. + OAuthCredentials oauth = 1; + } +} + +// Represents OAuth credentials. +message OAuthCredentials { + // The name of the secret containing the access token. + // Represents secret-based OAuth credentials. + message SecretBased { + // Required. An OAuth client ID. + string client_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. An OAuth client secret. + string client_secret = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Read more about Looker access tokens here: + // https://developers.looker.com/api/advanced-usage/looker-api-oauth + message TokenBased { + // Required. The name of the secret containing the access token. + string access_token = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The kind of OAuth credentials. + oneof kind { + // Secret-based OAuth credentials. + SecretBased secret = 2; + + // Token-based OAuth credentials. + TokenBased token = 3; + } +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_agent.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_agent.proto new file mode 100644 index 000000000000..f4bbf3adb2ad --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_agent.proto @@ -0,0 +1,101 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAgentProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// Message describing a DataAgent object. +message DataAgent { + option (google.api.resource) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + pattern: "projects/{project}/locations/{location}/dataAgents/{data_agent}" + plural: "dataAgents" + singular: "dataAgent" + }; + + // The type of the agent. Can be one of the following: + // * Data analytics agent. + // * Data engineering agent + oneof type { + // Data analytics agent. + DataAnalyticsAgent data_analytics_agent = 101; + } + + // Optional. Identifier. The unique resource name of a DataAgent. + // Format: + // `projects/{project}/locations/{location}/dataAgents/{data_agent_id}` + // `{data_agent}` is the resource id and should be 63 characters or less and + // must match the format described in + // https://google.aip.dev/122#resource-id-segments + // + // Example: `projects/1234567890/locations/us-central1/dataAgents/my-agent`. + // + // It is recommended to skip setting this field during agent creation as it + // will be inferred automatically and overwritten with the + // {parent}/dataAgents/{data_agent_id}. + string name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. User friendly display name. + // + // * Must be between 1-256 characters. + string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the agent. + // + // * Must be between 1-1024 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to help users filter related agents. + // For example, "sales", "business", "etl", and so on. + // Note labels are used only for filtering and not for policies. + // See the [labels + // documentation](https://cloud.google.com/resource-manager/docs/labels-overview) + // for more details on label usage. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the data agent was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the data agent was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] The time the data agent was soft deleted. + google.protobuf.Timestamp delete_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp in UTC of when this data agent is considered + // expired. This is *always* provided on output, regardless of what was sent + // on input. + google.protobuf.Timestamp purge_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_agent_service.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_agent_service.proto new file mode 100644 index 000000000000..e53d4cabd323 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_agent_service.proto @@ -0,0 +1,385 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1beta/data_agent.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAgentServiceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// Service describing handlers for resources. +service DataAgentService { + option (google.api.default_host) = "geminidataanalytics.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists DataAgents in a given project and location. + rpc ListDataAgents(ListDataAgentsRequest) returns (ListDataAgentsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/dataAgents" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists DataAgents that are accessible to the caller in a given project and + // location. + rpc ListAccessibleDataAgents(ListAccessibleDataAgentsRequest) + returns (ListAccessibleDataAgentsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/dataAgents:listAccessible" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DataAgent. + rpc GetDataAgent(GetDataAgentRequest) returns (DataAgent) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/dataAgents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new DataAgent in a given project and location. + rpc CreateDataAgent(CreateDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/dataAgents" + body: "data_agent" + }; + option (google.api.method_signature) = "parent,data_agent,data_agent_id"; + option (google.longrunning.operation_info) = { + response_type: "DataAgent" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single DataAgent. + rpc UpdateDataAgent(UpdateDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{data_agent.name=projects/*/locations/*/dataAgents/*}" + body: "data_agent" + }; + option (google.api.method_signature) = "data_agent,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataAgent" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single DataAgent. + rpc DeleteDataAgent(DeleteDataAgentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/dataAgents/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets the IAM policy for DataAgent + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the IAM policy for a DataAgent. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource"; + } +} + +// Message for requesting list of DataAgents. +message ListDataAgentsRequest { + // Required. Parent value for ListDataAgentsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataAgents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDataAgents` must + // match the call that provided the page token. The service may return fewer + // than this value. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User specification for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the list results will include soft-deleted DataAgents. + // Defaults to false. + bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing DataAgents. +message ListDataAgentsResponse { + // The list of DataAgent. + repeated DataAgent data_agents = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for requesting list of accessible DataAgents. +message ListAccessibleDataAgentsRequest { + // Filter for the creator of the agent. + enum CreatorFilter { + // Default value. + CREATOR_FILTER_UNSPECIFIED = 0; + + // No creator-specific filter will be applied. All agents will be returned. + NONE = 1; + + // Only agents created by the user calling the API will be returned. + CREATOR_ONLY = 2; + + // Only agents not created by the user calling the API will be returned. + NOT_CREATOR_ONLY = 3; + } + + // Required. Parent value for ListAccessibleDataAgentsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAccessibleDataAgents` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListAccessibleDataAgents` must match the call that provided the page + // token. The service may return fewer than this value. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User specification for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the list results will include soft-deleted DataAgents. + // Defaults to false. + bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the creator of the agent. + CreatorFilter creator_filter = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing accessible DataAgents. +message ListAccessibleDataAgentsResponse { + // The list of accessible DataAgent. + repeated DataAgent data_agents = 1; + + // The next page token or empty if none. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for getting a DataAgent. +message GetDataAgentRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; +} + +// Message for creating a DataAgent. +message CreateDataAgentRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. Id of the requesting object. Must be unique within the parent. + // The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + // If not provided, the server will auto-generate a value for the id. + string data_agent_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being created. + DataAgent data_agent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a DataAgent. +message UpdateDataAgentRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // DataAgent resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields with non-default values + // present in the request will be overwritten. If a wildcard mask is provided, + // all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated. + DataAgent data_agent = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a DataAgent. +message DeleteDataAgentRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto new file mode 100644 index 000000000000..78efe3bd329a --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto @@ -0,0 +1,46 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/field_behavior.proto"; +import "google/cloud/geminidataanalytics/v1beta/context.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataAnalyticsAgentProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// Message describing a DataAnalyticsAgent object. +message DataAnalyticsAgent { + // Optional. The staging context for the agent. + // This context is used to test and validate changes before publishing. + Context staging_context = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The published context for the agent. + // This context is used by the Chat API in production. + Context published_context = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The last published context for the agent. + // This is an output-only field populated by the system when the + // published context is updated. It is used to restore the agent to a + // previous state. + Context last_published_context = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto new file mode 100644 index 000000000000..145efb2a384b --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto @@ -0,0 +1,559 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/geminidataanalytics/v1beta/context.proto"; +import "google/cloud/geminidataanalytics/v1beta/conversation.proto"; +import "google/cloud/geminidataanalytics/v1beta/credentials.proto"; +import "google/cloud/geminidataanalytics/v1beta/datasource.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DataChatServiceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// Service to ask a natural language question on top of BigQuery +// and Looker Studio datasources to get back streamed responses of various kinds +// to help provide a rich conversational answer. +service DataChatService { + option (google.api.default_host) = "geminidataanalytics.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Answers a data question by generating a stream of + // [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. + rpc Chat(ChatRequest) returns (stream Message) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}:chat" + body: "*" + }; + } + + // Creates a new conversation to persist the conversation history. Each + // conversation will have multiple messages associated with it. + rpc CreateConversation(CreateConversationRequest) returns (Conversation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/conversations" + body: "conversation" + }; + option (google.api.method_signature) = + "parent,conversation,conversation_id"; + } + + // Gets details of a single conversation by using conversation id and parent. + rpc GetConversation(GetConversationRequest) returns (Conversation) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/conversations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all conversations for a given parent. + rpc ListConversations(ListConversationsRequest) + returns (ListConversationsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/conversations" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all messages for a given conversation. + rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/conversations/*}/messages" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request for listing chat messages based on parent and conversation_id. +message ListMessagesRequest { + // Required. The conversation to list messages under. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. The max page size is 100. All larger page sizes will be coerced + // to 100. If unspecified, server will pick 50 as an approperiate default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + // syntax. + // + // ListMessages allows filtering by: + // * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + // * update_time + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for listing chat messages. +message ListMessagesResponse { + // The list of chat messages. + repeated StorageMessage messages = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// A stored message containing user message or system message. +message StorageMessage { + // The unique resource name of a chat message. + string message_id = 1; + + // The message content. + Message message = 2; +} + +// Request for Chat. +message ChatRequest { + // Context Provider for the chat request. + // It can either be - + // inline_context, which is a context provided inline in the request. + // data_agent, which is a reference to a data agent resource. + // conversation_reference, which is a reference to a persisted conversation + // and context using conversation_id and agent_id. + oneof context_provider { + // Optional. Inline context for the chat request. Use this to chat + // statelessly (without managed conversation persistence and without an + // Agent) by passing all context inline. + Context inline_context = 101 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reference to a persisted conversation and agent context. + // Use this to chat with an Agent using managed conversation persistence. + ConversationReference conversation_reference = 103 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Context for the chat request. Use this to chat with an Agent + // statelessly, without managed conversation persistence. + DataAgentContext data_agent_context = 104 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The Google Cloud project to be used for quota and billing. + string project = 1 [ + deprecated = true, + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The parent value for chat request. + // Pattern: `projects/{project}/locations/{location}` + string parent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Content of current conversation. + repeated Message messages = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Context for the chat request using a data agent. +message DataAgentContext { + // List of context versions supported by DCS. + // There are two versions of context. This is to maintain versioning for the + // data agent. + enum ContextVersion { + // Unspecified or unrecognized. + CONTEXT_VERSION_UNSPECIFIED = 0; + + // Using this version, DCS will use the latest staging context for the + // data agent. + STAGING = 1; + + // Using this version, DCS will use the latest published context for the + // data agent. + PUBLISHED = 2; + } + + // Required. The name of the data agent resource. + string data_agent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/DataAgent" + } + ]; + + // Optional. The credentials to use when calling the Looker data source. + // + // Currently supports both OAuth token and API key-based credentials, as + // described in + // [Authentication with an + // SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). + Credentials credentials = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED) + ContextVersion context_version = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Reference to a persisted conversation and agent context. +message ConversationReference { + // Required. Name of the conversation resource. + // Format: + // `projects/{project}/locations/{location}/conversations/{conversation_id}` + string conversation = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "geminidataanalytics.googleapis.com/Conversation" + } + ]; + + // Required. Context for the chat request using a data agent. + DataAgentContext data_agent_context = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// A message from an interaction between the user and the system. +message Message { + // The kind of message. + oneof kind { + // A message from the user that is interacting with the system. + UserMessage user_message = 2; + + // A message from the system in response to the user. + SystemMessage system_message = 3; + } + + // Output only. For user messages, this is the time at which the system + // received the message. For system messages, this is the time at which the + // system generated the message. + google.protobuf.Timestamp timestamp = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. unique id of the message in the conversation for persistence. + string message_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message from the user that is interacting with the system. +message UserMessage { + // The kind of content in the user message. + oneof kind { + // Text should use this field instead of blob. + string text = 1; + } +} + +// A message from the system in response to the user. This message can also be a +// message from the user as historical context for multiturn conversations with +// the system. +message SystemMessage { + // The kind of content in the system message. + oneof kind { + // A direct natural language response to the user message. + TextMessage text = 1; + + // A message produced during schema resolution. + SchemaMessage schema = 2; + + // A message produced during data retrieval. + DataMessage data = 3; + + // A message produced during analysis. + AnalysisMessage analysis = 4; + + // A message produced during chart generation. + ChartMessage chart = 5; + + // An error message. + ErrorMessage error = 6; + } + + // Identifies the group that the event belongs to. Similar events are deemed + // to be logically relevant to each other and should be shown together in + // the UI. + optional int32 group_id = 12; +} + +// A multi-part text message. +message TextMessage { + // Optional. The parts of the message. + repeated string parts = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during schema resolution. +message SchemaMessage { + // Whether this message contains the query or the result of the schema + // resolution. + oneof kind { + // A schema resolution query. + SchemaQuery query = 1; + + // The result of a schema resolution query. + SchemaResult result = 2; + } +} + +// A query for resolving the schema relevant to the posed question. +message SchemaQuery { + // Optional. The question to send to the system for schema resolution. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of schema resolution. +message SchemaResult { + // Optional. The datasources used to resolve the schema query. + repeated Datasource datasources = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during data retrieval. +message DataMessage { + // Whether this message contains the query, the result, or generated SQL for + // the data retrieval. + oneof kind { + // A data retrieval query. + DataQuery query = 1; + + // SQL generated by the system to retrieve data. + string generated_sql = 2; + + // Retrieved data. + DataResult result = 3; + + // Looker Query generated by the system to retrieve data. + LookerQuery generated_looker_query = 4; + + // A BigQuery job executed by the system to retrieve data. + BigQueryJob big_query_job = 5; + } +} + +// A query for retrieving data from a Looker Explore. See +// [Run Inline +// Query](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query). +message LookerQuery { + // A Looker query filter. + message Filter { + // Required. The field to filter on. + string field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value f field to filter on. + string value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. The LookML model used to generate the query. + string model = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The LookML Explore used to generate the query. + string explore = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The fields to retrieve from the Explore. + repeated string fields = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters to apply to the Explore. + repeated Filter filters = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sorts to apply to the Explore. + repeated string sorts = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limit in the query. + optional string limit = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A query for retrieving data. +message DataQuery { + // Optional. A natural language question to answer. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A snake-case name for the query that reflects its intent. It is + // used to name the corresponding data result, so that it can be referenced in + // later steps. + // + // * Example: "total_sales_by_product" + // * Example: "sales_for_product_12345" + string name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The datasources available to answer the question. + repeated Datasource datasources = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Retrieved data. +message DataResult { + // Optional. A snake-case name for the data result that reflects its contents. + // The name is used to pass the result around by reference, and serves as a + // signal about its meaning. + // + // * Example: "total_sales_by_product" + // * Example: "sales_for_product_12345" + string name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The schema of the data. + Schema schema = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The content of the data. Each row is a struct that matches the + // schema. Simple values are represented as strings, while nested structures + // are represented as lists or structs. + repeated google.protobuf.Struct data = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A BigQuery job executed by the system. +message BigQueryJob { + // Required. The project that the job belongs to. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the job. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string job_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The location of the job. + // + // See + // [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + string location = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A reference to the destination table of the job's query results. + // + // See + // [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery). + BigQueryTableReference destination_table = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The schema of the job's query results. + // + // See + // [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2). + Schema schema = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// A message produced during analysis. +message AnalysisMessage { + // Whether this message contains the query or one of the events from the + // analysis. + oneof kind { + // An analysis query. + AnalysisQuery query = 1; + + // An event indicating the progress of the analysis. + AnalysisEvent progress_event = 2; + } +} + +// A query for performing an analysis. +message AnalysisQuery { + // Optional. An analysis question to help answer the user's original question. + string question = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The names of previously retrieved data results to analyze. + repeated string data_result_names = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An event indicating the progress of an analysis. +message AnalysisEvent { + // The kind of event that occurred during the analysis. + oneof kind { + // Python codegen planner's reasoning. + string planner_reasoning = 2; + + // Instructions issued for code generation. + string coder_instruction = 3; + + // Generated code. + string code = 4; + + // Output from code execution. + string execution_output = 5; + + // An error from code execution. + string execution_error = 6; + + // Result as Vega chart JSON string. + string result_vega_chart_json = 7; + + // Result as NL string. + string result_natural_language = 8; + + // Result as CSV string. + string result_csv_data = 9; + + // Result as a reference to a data source. + string result_reference_data = 10; + + // A generic error message. + string error = 11; + } +} + +// A message produced during chart generation. +message ChartMessage { + // Whether this message contains the query or the result of the chart + // generation. + oneof kind { + // A query for generating a chart. + ChartQuery query = 1; + + // The result of a chart generation query. + ChartResult result = 2; + } +} + +// A query for generating a chart. +message ChartQuery { + // Optional. Natural language instructions for generating the chart. + string instructions = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of a previously retrieved data result to use in the + // chart. + string data_result_name = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The result of a chart generation query. +message ChartResult { + // Optional. A generated Vega chart config. + // See https://vega.github.io/vega/docs/config/ + google.protobuf.Struct vega_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A rendering of the chart if this was requested in the context. + Blob image = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// An error message. +message ErrorMessage { + // Output only. The text of the error. + string text = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A blob of data with a MIME type. +message Blob { + // Required. The IANA standard MIME type of the message data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The data represented as bytes. + bytes data = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/datasource.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/datasource.proto new file mode 100644 index 000000000000..206279d2237c --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/datasource.proto @@ -0,0 +1,241 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.geminidataanalytics.v1beta; + +import "google/api/field_behavior.proto"; +import "google/cloud/geminidataanalytics/v1beta/credentials.proto"; + +option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta"; +option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb"; +option java_multiple_files = true; +option java_outer_classname = "DatasourceProto"; +option java_package = "com.google.cloud.geminidataanalytics.v1beta"; +option php_namespace = "Google\\Cloud\\GeminiDataAnalytics\\V1beta"; +option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta"; + +// The type of filter present on a datasource, such as ALWAYS_FILTER. +enum DataFilterType { + // The filter type was not specified. + DATA_FILTER_TYPE_UNSPECIFIED = 0; + + // A filter that the user configures, and any queries to the Explore will + // always apply this filter by default. Currently only used for Looker data + // sources. + ALWAYS_FILTER = 1; +} + +// A collection of references to datasources. +message DatasourceReferences { + // The datasources to use. + oneof references { + // References to BigQuery tables. + BigQueryTableReferences bq = 1; + + // References to Looker Studio datasources. + StudioDatasourceReferences studio = 2; + + // References to Looker Explores. + LookerExploreReferences looker = 3; + } +} + +// Message representing references to BigQuery tables. +message BigQueryTableReferences { + // Required. References to BigQuery tables. + repeated BigQueryTableReference table_references = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing a reference to a single BigQuery table. +message BigQueryTableReference { + // Required. The project that the table belongs to. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The dataset that the table belongs to. + string dataset_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table id. + string table_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema of the datasource. + Schema schema = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing references to Looker Studio datasources. +message StudioDatasourceReferences { + // The references to the studio datasources. + repeated StudioDatasourceReference studio_references = 2; +} + +// Message representing a reference to a single Looker Studio datasource. +message StudioDatasourceReference { + // Required. The id of the datasource. + string datasource_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing references to Looker explores. +message LookerExploreReferences { + // Required. References to Looker explores. + repeated LookerExploreReference explore_references = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The credentials to use when calling the Looker API. + // + // Currently supports both OAuth token and API key-based credentials, as + // described in + // [Authentication with an + // SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). + Credentials credentials = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing a reference to a single Looker explore. +message LookerExploreReference { + // The instance of the Looker explore. + oneof instance { + // Required. The base url of the Looker instance. + string looker_instance_uri = 9; + + // Private Looker instance info. + PrivateLookerInstanceInfo private_looker_instance_info = 10; + } + + // Required. Looker model, as outlined in + // [Major LookML + // structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + // Name of the LookML model. + string lookml_model = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Looker Explore, as outlined in + // [Major LookML + // structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + // Name of the LookML Explore. + string explore = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema of the datasource. + Schema schema = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message representing a private Looker instance info required if the Looker +// instance is behind a private network. +message PrivateLookerInstanceInfo { + // The Looker instance id. + string looker_instance_id = 1; + + // The service directory name of the Looker instance. + string service_directory_name = 2; +} + +// A datasource that can be used to answer questions. +message Datasource { + // The reference to the datasource. + oneof reference { + // A reference to a BigQuery table. + BigQueryTableReference bigquery_table_reference = 1; + + // A reference to a Looker Studio datasource. + string studio_datasource_id = 2; + + // A reference to a Looker explore. + LookerExploreReference looker_explore_reference = 4; + } + + // Optional. The schema of the datasource. + Schema schema = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The schema of a Datasource or QueryResult instance. +message Schema { + // Optional. The fields in the schema. + repeated Field fields = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A textual description of the table's content and purpose. + // For example: "Contains information about customer orders in our e-commerce + // store." + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of alternative names or synonyms that can be used to refer + // to the table. For example: ["sales", "orders", "purchases"] + repeated string synonyms = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of tags or keywords associated with the table, used for + // categorization. For example: ["transaction", "revenue", "customer_data"] + repeated string tags = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Table display_name (same as label in + // cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not + // required, currently only Looker has this field. + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters on the datasource's underlying data. Currently only + // used for Looker data sources. + repeated DataFilter filters = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A field in a schema. +message Field { + // Optional. The name of the field. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the field. + string type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A brief description of the field. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mode of the field (e.g., NULLABLE, REPEATED). + string mode = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of alternative names or synonyms that can be used to refer + // to this field. For example: ["id", "customerid", "cust_id"] + repeated string synonyms = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of tags or keywords associated with the field, used for + // categorization. For example: ["identifier", "customer", "pii"] + repeated string tags = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field display_name (same as label in + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Recursive property for nested schema structures. + repeated Field subfields = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field category, not required, currently only useful for Looker. + // We are using a string to avoid depending on an external package and keep + // this package self-contained. + string category = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Looker only. Value format of the field. + // Ref: + // https://cloud.google.com/looker/docs/reference/param-field-value-format + string value_format = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// A filter on a datasource's underlying data. Filter syntax documentation: +// https://cloud.google.com/looker/docs/filter-expressions +message DataFilter { + // Optional. The field to filter on. For example: ["event_date", + // "customer_id", "product_category"] + string field = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default value used for this filter if the filter is not + // overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"] + string value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of filter present on a datasource, such as + // ALWAYS_FILTER. + DataFilterType type = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-geminidataanalytics/protos/protos.d.ts b/packages/google-cloud-geminidataanalytics/protos/protos.d.ts new file mode 100644 index 000000000000..40a61c8e3c4e --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/protos.d.ts @@ -0,0 +1,26108 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace geminidataanalytics. */ + namespace geminidataanalytics { + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Properties of a Context. */ + interface IContext { + + /** Context systemInstruction */ + systemInstruction?: (string|null); + + /** Context datasourceReferences */ + datasourceReferences?: (google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences|null); + + /** Context options */ + options?: (google.cloud.geminidataanalytics.v1alpha.IConversationOptions|null); + + /** Context exampleQueries */ + exampleQueries?: (google.cloud.geminidataanalytics.v1alpha.IExampleQuery[]|null); + + /** Context glossaryTerms */ + glossaryTerms?: (google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm[]|null); + + /** Context schemaRelationships */ + schemaRelationships?: (google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship[]|null); + } + + /** Represents a Context. */ + class Context implements IContext { + + /** + * Constructs a new Context. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IContext); + + /** Context systemInstruction. */ + public systemInstruction: string; + + /** Context datasourceReferences. */ + public datasourceReferences?: (google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences|null); + + /** Context options. */ + public options?: (google.cloud.geminidataanalytics.v1alpha.IConversationOptions|null); + + /** Context exampleQueries. */ + public exampleQueries: google.cloud.geminidataanalytics.v1alpha.IExampleQuery[]; + + /** Context glossaryTerms. */ + public glossaryTerms: google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm[]; + + /** Context schemaRelationships. */ + public schemaRelationships: google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship[]; + + /** + * Creates a new Context instance using the specified properties. + * @param [properties] Properties to set + * @returns Context instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IContext): google.cloud.geminidataanalytics.v1alpha.Context; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Context message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Context; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Context; + + /** + * Verifies a Context message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Context + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Context; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @param message Context + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Context to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Context + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Context { + + /** Properties of a SchemaRelationship. */ + interface ISchemaRelationship { + + /** SchemaRelationship leftSchemaPaths */ + leftSchemaPaths?: (google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null); + + /** SchemaRelationship rightSchemaPaths */ + rightSchemaPaths?: (google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null); + + /** SchemaRelationship sources */ + sources?: (google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.Source[]|null); + + /** SchemaRelationship confidenceScore */ + confidenceScore?: (number|null); + } + + /** Represents a SchemaRelationship. */ + class SchemaRelationship implements ISchemaRelationship { + + /** + * Constructs a new SchemaRelationship. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship); + + /** SchemaRelationship leftSchemaPaths. */ + public leftSchemaPaths?: (google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null); + + /** SchemaRelationship rightSchemaPaths. */ + public rightSchemaPaths?: (google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null); + + /** SchemaRelationship sources. */ + public sources: google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.Source[]; + + /** SchemaRelationship confidenceScore. */ + public confidenceScore: number; + + /** + * Creates a new SchemaRelationship instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRelationship instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship; + + /** + * Encodes the specified SchemaRelationship message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.verify|verify} messages. + * @param message SchemaRelationship message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRelationship message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.verify|verify} messages. + * @param message SchemaRelationship message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRelationship message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRelationship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship; + + /** + * Decodes a SchemaRelationship message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRelationship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship; + + /** + * Verifies a SchemaRelationship message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaRelationship message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRelationship + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship; + + /** + * Creates a plain object from a SchemaRelationship message. Also converts values to other types if specified. + * @param message SchemaRelationship + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRelationship to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRelationship + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaRelationship { + + /** Properties of a SchemaPaths. */ + interface ISchemaPaths { + + /** SchemaPaths tableFqn */ + tableFqn?: (string|null); + + /** SchemaPaths paths */ + paths?: (string[]|null); + } + + /** Represents a SchemaPaths. */ + class SchemaPaths implements ISchemaPaths { + + /** + * Constructs a new SchemaPaths. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths); + + /** SchemaPaths tableFqn. */ + public tableFqn: string; + + /** SchemaPaths paths. */ + public paths: string[]; + + /** + * Creates a new SchemaPaths instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaPaths instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths; + + /** + * Encodes the specified SchemaPaths message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.verify|verify} messages. + * @param message SchemaPaths message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaPaths message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.verify|verify} messages. + * @param message SchemaPaths message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaPaths message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths; + + /** + * Decodes a SchemaPaths message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths; + + /** + * Verifies a SchemaPaths message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaPaths message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaPaths + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths; + + /** + * Creates a plain object from a SchemaPaths message. Also converts values to other types if specified. + * @param message SchemaPaths + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaPaths to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaPaths + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Source enum. */ + enum Source { + SOURCE_UNSPECIFIED = 0, + BIGQUERY_JOB_HISTORY = 1, + LLM_SUGGESTED = 2, + BIGQUERY_TABLE_CONSTRAINTS = 3 + } + } + } + + /** Properties of an ExampleQuery. */ + interface IExampleQuery { + + /** ExampleQuery sqlQuery */ + sqlQuery?: (string|null); + + /** ExampleQuery naturalLanguageQuestion */ + naturalLanguageQuestion?: (string|null); + } + + /** Represents an ExampleQuery. */ + class ExampleQuery implements IExampleQuery { + + /** + * Constructs a new ExampleQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IExampleQuery); + + /** ExampleQuery sqlQuery. */ + public sqlQuery?: (string|null); + + /** ExampleQuery naturalLanguageQuestion. */ + public naturalLanguageQuestion: string; + + /** ExampleQuery query. */ + public query?: "sqlQuery"; + + /** + * Creates a new ExampleQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns ExampleQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IExampleQuery): google.cloud.geminidataanalytics.v1alpha.ExampleQuery; + + /** + * Encodes the specified ExampleQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify|verify} messages. + * @param message ExampleQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IExampleQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExampleQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify|verify} messages. + * @param message ExampleQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IExampleQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ExampleQuery; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ExampleQuery; + + /** + * Verifies an ExampleQuery message. + * @param message Plain 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 ExampleQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExampleQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ExampleQuery; + + /** + * Creates a plain object from an ExampleQuery message. Also converts values to other types if specified. + * @param message ExampleQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ExampleQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExampleQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExampleQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GlossaryTerm. */ + interface IGlossaryTerm { + + /** GlossaryTerm displayName */ + displayName?: (string|null); + + /** GlossaryTerm description */ + description?: (string|null); + + /** GlossaryTerm labels */ + labels?: (string[]|null); + } + + /** Represents a GlossaryTerm. */ + class GlossaryTerm implements IGlossaryTerm { + + /** + * Constructs a new GlossaryTerm. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm); + + /** GlossaryTerm displayName. */ + public displayName: string; + + /** GlossaryTerm description. */ + public description: string; + + /** GlossaryTerm labels. */ + public labels: string[]; + + /** + * Creates a new GlossaryTerm instance using the specified properties. + * @param [properties] Properties to set + * @returns GlossaryTerm instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm): google.cloud.geminidataanalytics.v1alpha.GlossaryTerm; + + /** + * Encodes the specified GlossaryTerm message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.verify|verify} messages. + * @param message GlossaryTerm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GlossaryTerm message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.verify|verify} messages. + * @param message GlossaryTerm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GlossaryTerm message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GlossaryTerm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.GlossaryTerm; + + /** + * Decodes a GlossaryTerm message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GlossaryTerm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.GlossaryTerm; + + /** + * Verifies a GlossaryTerm message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GlossaryTerm message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GlossaryTerm + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.GlossaryTerm; + + /** + * Creates a plain object from a GlossaryTerm message. Also converts values to other types if specified. + * @param message GlossaryTerm + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.GlossaryTerm, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GlossaryTerm to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GlossaryTerm + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationOptions. */ + interface IConversationOptions { + + /** ConversationOptions chart */ + chart?: (google.cloud.geminidataanalytics.v1alpha.IChartOptions|null); + + /** ConversationOptions analysis */ + analysis?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions|null); + } + + /** Represents a ConversationOptions. */ + class ConversationOptions implements IConversationOptions { + + /** + * Constructs a new ConversationOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IConversationOptions); + + /** ConversationOptions chart. */ + public chart?: (google.cloud.geminidataanalytics.v1alpha.IChartOptions|null); + + /** ConversationOptions analysis. */ + public analysis?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions|null); + + /** + * Creates a new ConversationOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IConversationOptions): google.cloud.geminidataanalytics.v1alpha.ConversationOptions; + + /** + * Encodes the specified ConversationOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationOptions.verify|verify} messages. + * @param message ConversationOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IConversationOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationOptions.verify|verify} messages. + * @param message ConversationOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IConversationOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ConversationOptions; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ConversationOptions; + + /** + * Verifies a ConversationOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ConversationOptions; + + /** + * Creates a plain object from a ConversationOptions message. Also converts values to other types if specified. + * @param message ConversationOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ConversationOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartOptions. */ + interface IChartOptions { + + /** ChartOptions image */ + image?: (google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions|null); + } + + /** Represents a ChartOptions. */ + class ChartOptions implements IChartOptions { + + /** + * Constructs a new ChartOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IChartOptions); + + /** ChartOptions image. */ + public image?: (google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions|null); + + /** + * Creates a new ChartOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IChartOptions): google.cloud.geminidataanalytics.v1alpha.ChartOptions; + + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChartOptions; + + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChartOptions; + + /** + * Verifies a ChartOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChartOptions; + + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @param message ChartOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChartOptions { + + /** Properties of an ImageOptions. */ + interface IImageOptions { + + /** ImageOptions noImage */ + noImage?: (google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage|null); + + /** ImageOptions svg */ + svg?: (google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions|null); + } + + /** Represents an ImageOptions. */ + class ImageOptions implements IImageOptions { + + /** + * Constructs a new ImageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions); + + /** ImageOptions noImage. */ + public noImage?: (google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage|null); + + /** ImageOptions svg. */ + public svg?: (google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions|null); + + /** ImageOptions kind. */ + public kind?: ("noImage"|"svg"); + + /** + * Creates a new ImageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions; + + /** + * Encodes the specified ImageOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.verify|verify} messages. + * @param message ImageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.verify|verify} messages. + * @param message ImageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions; + + /** + * Decodes an ImageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions; + + /** + * Verifies an ImageOptions message. + * @param message Plain 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 ImageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions; + + /** + * Creates a plain object from an ImageOptions message. Also converts values to other types if specified. + * @param message ImageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImageOptions { + + /** Properties of a NoImage. */ + interface INoImage { + } + + /** Represents a NoImage. */ + class NoImage implements INoImage { + + /** + * Constructs a new NoImage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage); + + /** + * Creates a new NoImage instance using the specified properties. + * @param [properties] Properties to set + * @returns NoImage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage; + + /** + * Encodes the specified NoImage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @param message NoImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NoImage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @param message NoImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NoImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage; + + /** + * Decodes a NoImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage; + + /** + * Verifies a NoImage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NoImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NoImage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage; + + /** + * Creates a plain object from a NoImage message. Also converts values to other types if specified. + * @param message NoImage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NoImage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NoImage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SvgOptions. */ + interface ISvgOptions { + } + + /** Represents a SvgOptions. */ + class SvgOptions implements ISvgOptions { + + /** + * Constructs a new SvgOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions); + + /** + * Creates a new SvgOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns SvgOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions; + + /** + * Encodes the specified SvgOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @param message SvgOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SvgOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @param message SvgOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SvgOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions; + + /** + * Decodes a SvgOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions; + + /** + * Verifies a SvgOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SvgOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SvgOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions; + + /** + * Creates a plain object from a SvgOptions message. Also converts values to other types if specified. + * @param message SvgOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SvgOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SvgOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an AnalysisOptions. */ + interface IAnalysisOptions { + + /** AnalysisOptions python */ + python?: (google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython|null); + } + + /** Represents an AnalysisOptions. */ + class AnalysisOptions implements IAnalysisOptions { + + /** + * Constructs a new AnalysisOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions); + + /** AnalysisOptions python. */ + public python?: (google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython|null); + + /** + * Creates a new AnalysisOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions; + + /** + * Encodes the specified AnalysisOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.verify|verify} messages. + * @param message AnalysisOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.verify|verify} messages. + * @param message AnalysisOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions; + + /** + * Verifies an AnalysisOptions message. + * @param message Plain 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 AnalysisOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions; + + /** + * Creates a plain object from an AnalysisOptions message. Also converts values to other types if specified. + * @param message AnalysisOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.AnalysisOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnalysisOptions { + + /** Properties of a Python. */ + interface IPython { + + /** Python enabled */ + enabled?: (boolean|null); + } + + /** Represents a Python. */ + class Python implements IPython { + + /** + * Constructs a new Python. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython); + + /** Python enabled. */ + public enabled: boolean; + + /** + * Creates a new Python instance using the specified properties. + * @param [properties] Properties to set + * @returns Python instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python; + + /** + * Encodes the specified Python message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.verify|verify} messages. + * @param message Python message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Python message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.verify|verify} messages. + * @param message Python message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Python message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python; + + /** + * Decodes a Python message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python; + + /** + * Verifies a Python message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Python message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Python + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python; + + /** + * Creates a plain object from a Python message. Also converts values to other types if specified. + * @param message Python + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Python to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Python + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** DataFilterType enum. */ + enum DataFilterType { + DATA_FILTER_TYPE_UNSPECIFIED = 0, + ALWAYS_FILTER = 1 + } + + /** Properties of a DatasourceReferences. */ + interface IDatasourceReferences { + + /** DatasourceReferences bq */ + bq?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences|null); + + /** DatasourceReferences studio */ + studio?: (google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences|null); + + /** DatasourceReferences looker */ + looker?: (google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences|null); + } + + /** Represents a DatasourceReferences. */ + class DatasourceReferences implements IDatasourceReferences { + + /** + * Constructs a new DatasourceReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences); + + /** DatasourceReferences bq. */ + public bq?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences|null); + + /** DatasourceReferences studio. */ + public studio?: (google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences|null); + + /** DatasourceReferences looker. */ + public looker?: (google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences|null); + + /** DatasourceReferences references. */ + public references?: ("bq"|"studio"|"looker"); + + /** + * Creates a new DatasourceReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns DatasourceReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences): google.cloud.geminidataanalytics.v1alpha.DatasourceReferences; + + /** + * Encodes the specified DatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.verify|verify} messages. + * @param message DatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.verify|verify} messages. + * @param message DatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DatasourceReferences; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DatasourceReferences; + + /** + * Verifies a DatasourceReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatasourceReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DatasourceReferences; + + /** + * Creates a plain object from a DatasourceReferences message. Also converts values to other types if specified. + * @param message DatasourceReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DatasourceReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatasourceReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatasourceReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryTableReferences. */ + interface IBigQueryTableReferences { + + /** BigQueryTableReferences tableReferences */ + tableReferences?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference[]|null); + } + + /** Represents a BigQueryTableReferences. */ + class BigQueryTableReferences implements IBigQueryTableReferences { + + /** + * Constructs a new BigQueryTableReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences); + + /** BigQueryTableReferences tableReferences. */ + public tableReferences: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference[]; + + /** + * Creates a new BigQueryTableReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryTableReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences; + + /** + * Encodes the specified BigQueryTableReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.verify|verify} messages. + * @param message BigQueryTableReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryTableReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.verify|verify} messages. + * @param message BigQueryTableReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences; + + /** + * Verifies a BigQueryTableReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryTableReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryTableReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences; + + /** + * Creates a plain object from a BigQueryTableReferences message. Also converts values to other types if specified. + * @param message BigQueryTableReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryTableReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryTableReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryTableReference. */ + interface IBigQueryTableReference { + + /** BigQueryTableReference projectId */ + projectId?: (string|null); + + /** BigQueryTableReference datasetId */ + datasetId?: (string|null); + + /** BigQueryTableReference tableId */ + tableId?: (string|null); + + /** BigQueryTableReference schema */ + schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + } + + /** Represents a BigQueryTableReference. */ + class BigQueryTableReference implements IBigQueryTableReference { + + /** + * Constructs a new BigQueryTableReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference); + + /** BigQueryTableReference projectId. */ + public projectId: string; + + /** BigQueryTableReference datasetId. */ + public datasetId: string; + + /** BigQueryTableReference tableId. */ + public tableId: string; + + /** BigQueryTableReference schema. */ + public schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + + /** + * Creates a new BigQueryTableReference instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryTableReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference; + + /** + * Encodes the specified BigQueryTableReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.verify|verify} messages. + * @param message BigQueryTableReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryTableReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.verify|verify} messages. + * @param message BigQueryTableReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference; + + /** + * Verifies a BigQueryTableReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryTableReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryTableReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference; + + /** + * Creates a plain object from a BigQueryTableReference message. Also converts values to other types if specified. + * @param message BigQueryTableReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryTableReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryTableReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StudioDatasourceReferences. */ + interface IStudioDatasourceReferences { + + /** StudioDatasourceReferences studioReferences */ + studioReferences?: (google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference[]|null); + } + + /** Represents a StudioDatasourceReferences. */ + class StudioDatasourceReferences implements IStudioDatasourceReferences { + + /** + * Constructs a new StudioDatasourceReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences); + + /** StudioDatasourceReferences studioReferences. */ + public studioReferences: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference[]; + + /** + * Creates a new StudioDatasourceReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns StudioDatasourceReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences; + + /** + * Encodes the specified StudioDatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.verify|verify} messages. + * @param message StudioDatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StudioDatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.verify|verify} messages. + * @param message StudioDatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences; + + /** + * Verifies a StudioDatasourceReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StudioDatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StudioDatasourceReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences; + + /** + * Creates a plain object from a StudioDatasourceReferences message. Also converts values to other types if specified. + * @param message StudioDatasourceReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StudioDatasourceReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StudioDatasourceReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StudioDatasourceReference. */ + interface IStudioDatasourceReference { + + /** StudioDatasourceReference datasourceId */ + datasourceId?: (string|null); + } + + /** Represents a StudioDatasourceReference. */ + class StudioDatasourceReference implements IStudioDatasourceReference { + + /** + * Constructs a new StudioDatasourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference); + + /** StudioDatasourceReference datasourceId. */ + public datasourceId: string; + + /** + * Creates a new StudioDatasourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns StudioDatasourceReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference; + + /** + * Encodes the specified StudioDatasourceReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.verify|verify} messages. + * @param message StudioDatasourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StudioDatasourceReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.verify|verify} messages. + * @param message StudioDatasourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference; + + /** + * Verifies a StudioDatasourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StudioDatasourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StudioDatasourceReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference; + + /** + * Creates a plain object from a StudioDatasourceReference message. Also converts values to other types if specified. + * @param message StudioDatasourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StudioDatasourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StudioDatasourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookerExploreReferences. */ + interface ILookerExploreReferences { + + /** LookerExploreReferences exploreReferences */ + exploreReferences?: (google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference[]|null); + + /** LookerExploreReferences credentials */ + credentials?: (google.cloud.geminidataanalytics.v1alpha.ICredentials|null); + } + + /** Represents a LookerExploreReferences. */ + class LookerExploreReferences implements ILookerExploreReferences { + + /** + * Constructs a new LookerExploreReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences); + + /** LookerExploreReferences exploreReferences. */ + public exploreReferences: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference[]; + + /** LookerExploreReferences credentials. */ + public credentials?: (google.cloud.geminidataanalytics.v1alpha.ICredentials|null); + + /** + * Creates a new LookerExploreReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerExploreReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences): google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences; + + /** + * Encodes the specified LookerExploreReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.verify|verify} messages. + * @param message LookerExploreReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerExploreReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.verify|verify} messages. + * @param message LookerExploreReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences; + + /** + * Verifies a LookerExploreReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerExploreReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerExploreReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences; + + /** + * Creates a plain object from a LookerExploreReferences message. Also converts values to other types if specified. + * @param message LookerExploreReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerExploreReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerExploreReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookerExploreReference. */ + interface ILookerExploreReference { + + /** LookerExploreReference lookerInstanceUri */ + lookerInstanceUri?: (string|null); + + /** LookerExploreReference privateLookerInstanceInfo */ + privateLookerInstanceInfo?: (google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo|null); + + /** LookerExploreReference lookmlModel */ + lookmlModel?: (string|null); + + /** LookerExploreReference explore */ + explore?: (string|null); + + /** LookerExploreReference schema */ + schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + } + + /** Represents a LookerExploreReference. */ + class LookerExploreReference implements ILookerExploreReference { + + /** + * Constructs a new LookerExploreReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference); + + /** LookerExploreReference lookerInstanceUri. */ + public lookerInstanceUri?: (string|null); + + /** LookerExploreReference privateLookerInstanceInfo. */ + public privateLookerInstanceInfo?: (google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo|null); + + /** LookerExploreReference lookmlModel. */ + public lookmlModel: string; + + /** LookerExploreReference explore. */ + public explore: string; + + /** LookerExploreReference schema. */ + public schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + + /** LookerExploreReference instance. */ + public instance?: ("lookerInstanceUri"|"privateLookerInstanceInfo"); + + /** + * Creates a new LookerExploreReference instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerExploreReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference): google.cloud.geminidataanalytics.v1alpha.LookerExploreReference; + + /** + * Encodes the specified LookerExploreReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.verify|verify} messages. + * @param message LookerExploreReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerExploreReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.verify|verify} messages. + * @param message LookerExploreReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.LookerExploreReference; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.LookerExploreReference; + + /** + * Verifies a LookerExploreReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerExploreReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerExploreReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.LookerExploreReference; + + /** + * Creates a plain object from a LookerExploreReference message. Also converts values to other types if specified. + * @param message LookerExploreReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.LookerExploreReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerExploreReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerExploreReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateLookerInstanceInfo. */ + interface IPrivateLookerInstanceInfo { + + /** PrivateLookerInstanceInfo lookerInstanceId */ + lookerInstanceId?: (string|null); + + /** PrivateLookerInstanceInfo serviceDirectoryName */ + serviceDirectoryName?: (string|null); + } + + /** Represents a PrivateLookerInstanceInfo. */ + class PrivateLookerInstanceInfo implements IPrivateLookerInstanceInfo { + + /** + * Constructs a new PrivateLookerInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo); + + /** PrivateLookerInstanceInfo lookerInstanceId. */ + public lookerInstanceId: string; + + /** PrivateLookerInstanceInfo serviceDirectoryName. */ + public serviceDirectoryName: string; + + /** + * Creates a new PrivateLookerInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateLookerInstanceInfo instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo): google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo; + + /** + * Encodes the specified PrivateLookerInstanceInfo message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.verify|verify} messages. + * @param message PrivateLookerInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateLookerInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.verify|verify} messages. + * @param message PrivateLookerInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo; + + /** + * Verifies a PrivateLookerInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateLookerInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateLookerInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo; + + /** + * Creates a plain object from a PrivateLookerInstanceInfo message. Also converts values to other types if specified. + * @param message PrivateLookerInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateLookerInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateLookerInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Datasource. */ + interface IDatasource { + + /** Datasource bigqueryTableReference */ + bigqueryTableReference?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null); + + /** Datasource studioDatasourceId */ + studioDatasourceId?: (string|null); + + /** Datasource lookerExploreReference */ + lookerExploreReference?: (google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference|null); + + /** Datasource schema */ + schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + } + + /** Represents a Datasource. */ + class Datasource implements IDatasource { + + /** + * Constructs a new Datasource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDatasource); + + /** Datasource bigqueryTableReference. */ + public bigqueryTableReference?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null); + + /** Datasource studioDatasourceId. */ + public studioDatasourceId?: (string|null); + + /** Datasource lookerExploreReference. */ + public lookerExploreReference?: (google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference|null); + + /** Datasource schema. */ + public schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + + /** Datasource reference. */ + public reference?: ("bigqueryTableReference"|"studioDatasourceId"|"lookerExploreReference"); + + /** + * Creates a new Datasource instance using the specified properties. + * @param [properties] Properties to set + * @returns Datasource instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDatasource): google.cloud.geminidataanalytics.v1alpha.Datasource; + + /** + * Encodes the specified Datasource message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Datasource.verify|verify} messages. + * @param message Datasource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDatasource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Datasource message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Datasource.verify|verify} messages. + * @param message Datasource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDatasource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Datasource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Datasource; + + /** + * Decodes a Datasource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Datasource; + + /** + * Verifies a Datasource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Datasource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Datasource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Datasource; + + /** + * Creates a plain object from a Datasource message. Also converts values to other types if specified. + * @param message Datasource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Datasource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Datasource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Datasource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema fields */ + fields?: (google.cloud.geminidataanalytics.v1alpha.IField[]|null); + + /** Schema description */ + description?: (string|null); + + /** Schema synonyms */ + synonyms?: (string[]|null); + + /** Schema tags */ + tags?: (string[]|null); + + /** Schema displayName */ + displayName?: (string|null); + + /** Schema filters */ + filters?: (google.cloud.geminidataanalytics.v1alpha.IDataFilter[]|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ISchema); + + /** Schema fields. */ + public fields: google.cloud.geminidataanalytics.v1alpha.IField[]; + + /** Schema description. */ + public description: string; + + /** Schema synonyms. */ + public synonyms: string[]; + + /** Schema tags. */ + public tags: string[]; + + /** Schema displayName. */ + public displayName: string; + + /** Schema filters. */ + public filters: google.cloud.geminidataanalytics.v1alpha.IDataFilter[]; + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ISchema): google.cloud.geminidataanalytics.v1alpha.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Field. */ + interface IField { + + /** Field name */ + name?: (string|null); + + /** Field type */ + type?: (string|null); + + /** Field description */ + description?: (string|null); + + /** Field mode */ + mode?: (string|null); + + /** Field synonyms */ + synonyms?: (string[]|null); + + /** Field tags */ + tags?: (string[]|null); + + /** Field displayName */ + displayName?: (string|null); + + /** Field subfields */ + subfields?: (google.cloud.geminidataanalytics.v1alpha.IField[]|null); + + /** Field category */ + category?: (string|null); + + /** Field valueFormat */ + valueFormat?: (string|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IField); + + /** Field name. */ + public name: string; + + /** Field type. */ + public type: string; + + /** Field description. */ + public description: string; + + /** Field mode. */ + public mode: string; + + /** Field synonyms. */ + public synonyms: string[]; + + /** Field tags. */ + public tags: string[]; + + /** Field displayName. */ + public displayName: string; + + /** Field subfields. */ + public subfields: google.cloud.geminidataanalytics.v1alpha.IField[]; + + /** Field category. */ + public category: string; + + /** Field valueFormat. */ + public valueFormat: string; + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IField): google.cloud.geminidataanalytics.v1alpha.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Field; + + /** + * Verifies a Field message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataFilter. */ + interface IDataFilter { + + /** DataFilter field */ + field?: (string|null); + + /** DataFilter value */ + value?: (string|null); + + /** DataFilter type */ + type?: (google.cloud.geminidataanalytics.v1alpha.DataFilterType|keyof typeof google.cloud.geminidataanalytics.v1alpha.DataFilterType|null); + } + + /** Represents a DataFilter. */ + class DataFilter implements IDataFilter { + + /** + * Constructs a new DataFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDataFilter); + + /** DataFilter field. */ + public field: string; + + /** DataFilter value. */ + public value: string; + + /** DataFilter type. */ + public type: (google.cloud.geminidataanalytics.v1alpha.DataFilterType|keyof typeof google.cloud.geminidataanalytics.v1alpha.DataFilterType); + + /** + * Creates a new DataFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DataFilter instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDataFilter): google.cloud.geminidataanalytics.v1alpha.DataFilter; + + /** + * Encodes the specified DataFilter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataFilter.verify|verify} messages. + * @param message DataFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDataFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataFilter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataFilter.verify|verify} messages. + * @param message DataFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDataFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DataFilter; + + /** + * Decodes a DataFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DataFilter; + + /** + * Verifies a DataFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DataFilter; + + /** + * Creates a plain object from a DataFilter message. Also converts values to other types if specified. + * @param message DataFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DataFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Credentials. */ + interface ICredentials { + + /** Credentials oauth */ + oauth?: (google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials|null); + } + + /** Represents a Credentials. */ + class Credentials implements ICredentials { + + /** + * Constructs a new Credentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ICredentials); + + /** Credentials oauth. */ + public oauth?: (google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials|null); + + /** Credentials kind. */ + public kind?: "oauth"; + + /** + * Creates a new Credentials instance using the specified properties. + * @param [properties] Properties to set + * @returns Credentials instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ICredentials): google.cloud.geminidataanalytics.v1alpha.Credentials; + + /** + * Encodes the specified Credentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Credentials.verify|verify} messages. + * @param message Credentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ICredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Credentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Credentials.verify|verify} messages. + * @param message Credentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ICredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Credentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Credentials; + + /** + * Decodes a Credentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Credentials; + + /** + * Verifies a Credentials message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Credentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Credentials + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Credentials; + + /** + * Creates a plain object from a Credentials message. Also converts values to other types if specified. + * @param message Credentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Credentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Credentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Credentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a OAuthCredentials. */ + interface IOAuthCredentials { + + /** OAuthCredentials secret */ + secret?: (google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased|null); + + /** OAuthCredentials token */ + token?: (google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased|null); + } + + /** Represents a OAuthCredentials. */ + class OAuthCredentials implements IOAuthCredentials { + + /** + * Constructs a new OAuthCredentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials); + + /** OAuthCredentials secret. */ + public secret?: (google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased|null); + + /** OAuthCredentials token. */ + public token?: (google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased|null); + + /** OAuthCredentials kind. */ + public kind?: ("secret"|"token"); + + /** + * Creates a new OAuthCredentials instance using the specified properties. + * @param [properties] Properties to set + * @returns OAuthCredentials instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials; + + /** + * Encodes the specified OAuthCredentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.verify|verify} messages. + * @param message OAuthCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OAuthCredentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.verify|verify} messages. + * @param message OAuthCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials; + + /** + * Verifies a OAuthCredentials message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OAuthCredentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OAuthCredentials + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials; + + /** + * Creates a plain object from a OAuthCredentials message. Also converts values to other types if specified. + * @param message OAuthCredentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OAuthCredentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OAuthCredentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OAuthCredentials { + + /** Properties of a SecretBased. */ + interface ISecretBased { + + /** SecretBased clientId */ + clientId?: (string|null); + + /** SecretBased clientSecret */ + clientSecret?: (string|null); + } + + /** Represents a SecretBased. */ + class SecretBased implements ISecretBased { + + /** + * Constructs a new SecretBased. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased); + + /** SecretBased clientId. */ + public clientId: string; + + /** SecretBased clientSecret. */ + public clientSecret: string; + + /** + * Creates a new SecretBased instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretBased instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased; + + /** + * Encodes the specified SecretBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.verify|verify} messages. + * @param message SecretBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.verify|verify} messages. + * @param message SecretBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretBased message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased; + + /** + * Decodes a SecretBased message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased; + + /** + * Verifies a SecretBased message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretBased message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretBased + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased; + + /** + * Creates a plain object from a SecretBased message. Also converts values to other types if specified. + * @param message SecretBased + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretBased to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretBased + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TokenBased. */ + interface ITokenBased { + + /** TokenBased accessToken */ + accessToken?: (string|null); + } + + /** Represents a TokenBased. */ + class TokenBased implements ITokenBased { + + /** + * Constructs a new TokenBased. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased); + + /** TokenBased accessToken. */ + public accessToken: string; + + /** + * Creates a new TokenBased instance using the specified properties. + * @param [properties] Properties to set + * @returns TokenBased instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased; + + /** + * Encodes the specified TokenBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.verify|verify} messages. + * @param message TokenBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TokenBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.verify|verify} messages. + * @param message TokenBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TokenBased message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased; + + /** + * Decodes a TokenBased message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased; + + /** + * Verifies a TokenBased message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TokenBased message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TokenBased + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased; + + /** + * Creates a plain object from a TokenBased message. Also converts values to other types if specified. + * @param message TokenBased + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TokenBased to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TokenBased + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Conversation. */ + interface IConversation { + + /** Conversation name */ + name?: (string|null); + + /** Conversation agents */ + agents?: (string[]|null); + + /** Conversation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation lastUsedTime */ + lastUsedTime?: (google.protobuf.ITimestamp|null); + + /** Conversation labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IConversation); + + /** Conversation name. */ + public name: string; + + /** Conversation agents. */ + public agents: string[]; + + /** Conversation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation lastUsedTime. */ + public lastUsedTime?: (google.protobuf.ITimestamp|null); + + /** Conversation labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Conversation instance using the specified properties. + * @param [properties] Properties to set + * @returns Conversation instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IConversation): google.cloud.geminidataanalytics.v1alpha.Conversation; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Conversation; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Conversation; + + /** + * Verifies a Conversation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Conversation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Conversation; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @param message Conversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Conversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Conversation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConversationRequest. */ + interface ICreateConversationRequest { + + /** CreateConversationRequest parent */ + parent?: (string|null); + + /** CreateConversationRequest conversationId */ + conversationId?: (string|null); + + /** CreateConversationRequest conversation */ + conversation?: (google.cloud.geminidataanalytics.v1alpha.IConversation|null); + + /** CreateConversationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateConversationRequest. */ + class CreateConversationRequest implements ICreateConversationRequest { + + /** + * Constructs a new CreateConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest); + + /** CreateConversationRequest parent. */ + public parent: string; + + /** CreateConversationRequest conversationId. */ + public conversationId: string; + + /** CreateConversationRequest conversation. */ + public conversation?: (google.cloud.geminidataanalytics.v1alpha.IConversation|null); + + /** CreateConversationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConversationRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest): google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest; + + /** + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest; + + /** + * Verifies a CreateConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest; + + /** + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * @param message CreateConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConversationRequest. */ + interface IGetConversationRequest { + + /** GetConversationRequest name */ + name?: (string|null); + } + + /** Represents a GetConversationRequest. */ + class GetConversationRequest implements IGetConversationRequest { + + /** + * Constructs a new GetConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest); + + /** GetConversationRequest name. */ + public name: string; + + /** + * Creates a new GetConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConversationRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest): google.cloud.geminidataanalytics.v1alpha.GetConversationRequest; + + /** + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.GetConversationRequest; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.GetConversationRequest; + + /** + * Verifies a GetConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.GetConversationRequest; + + /** + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. + * @param message GetConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.GetConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationsRequest. */ + interface IListConversationsRequest { + + /** ListConversationsRequest parent */ + parent?: (string|null); + + /** ListConversationsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversationsRequest pageToken */ + pageToken?: (string|null); + + /** ListConversationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListConversationsRequest. */ + class ListConversationsRequest implements IListConversationsRequest { + + /** + * Constructs a new ListConversationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest); + + /** ListConversationsRequest parent. */ + public parent: string; + + /** ListConversationsRequest pageSize. */ + public pageSize: number; + + /** ListConversationsRequest pageToken. */ + public pageToken: string; + + /** ListConversationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListConversationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationsRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest): google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest; + + /** + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest; + + /** + * Verifies a ListConversationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest; + + /** + * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. + * @param message ListConversationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationsResponse. */ + interface IListConversationsResponse { + + /** ListConversationsResponse conversations */ + conversations?: (google.cloud.geminidataanalytics.v1alpha.IConversation[]|null); + + /** ListConversationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConversationsResponse. */ + class ListConversationsResponse implements IListConversationsResponse { + + /** + * Constructs a new ListConversationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse); + + /** ListConversationsResponse conversations. */ + public conversations: google.cloud.geminidataanalytics.v1alpha.IConversation[]; + + /** ListConversationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConversationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationsResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse): google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse; + + /** + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse; + + /** + * Verifies a ListConversationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse; + + /** + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * @param message ListConversationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConversationRequest. */ + interface IDeleteConversationRequest { + + /** DeleteConversationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConversationRequest. */ + class DeleteConversationRequest implements IDeleteConversationRequest { + + /** + * Constructs a new DeleteConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest); + + /** DeleteConversationRequest name. */ + public name: string; + + /** + * Creates a new DeleteConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConversationRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest): google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest; + + /** + * Encodes the specified DeleteConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest.verify|verify} messages. + * @param message DeleteConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest.verify|verify} messages. + * @param message DeleteConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest; + + /** + * Verifies a DeleteConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest; + + /** + * Creates a plain object from a DeleteConversationRequest message. Also converts values to other types if specified. + * @param message DeleteConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAgent. */ + interface IDataAgent { + + /** DataAgent dataAnalyticsAgent */ + dataAnalyticsAgent?: (google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent|null); + + /** DataAgent name */ + name?: (string|null); + + /** DataAgent displayName */ + displayName?: (string|null); + + /** DataAgent description */ + description?: (string|null); + + /** DataAgent labels */ + labels?: ({ [k: string]: string }|null); + + /** DataAgent createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent purgeTime */ + purgeTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataAgent. */ + class DataAgent implements IDataAgent { + + /** + * Constructs a new DataAgent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDataAgent); + + /** DataAgent dataAnalyticsAgent. */ + public dataAnalyticsAgent?: (google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent|null); + + /** DataAgent name. */ + public name: string; + + /** DataAgent displayName. */ + public displayName: string; + + /** DataAgent description. */ + public description: string; + + /** DataAgent labels. */ + public labels: { [k: string]: string }; + + /** DataAgent createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent purgeTime. */ + public purgeTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent type. */ + public type?: "dataAnalyticsAgent"; + + /** + * Creates a new DataAgent instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAgent instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDataAgent): google.cloud.geminidataanalytics.v1alpha.DataAgent; + + /** + * Encodes the specified DataAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgent.verify|verify} messages. + * @param message DataAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDataAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgent.verify|verify} messages. + * @param message DataAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDataAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAgent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DataAgent; + + /** + * Decodes a DataAgent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DataAgent; + + /** + * Verifies a DataAgent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAgent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAgent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DataAgent; + + /** + * Creates a plain object from a DataAgent message. Also converts values to other types if specified. + * @param message DataAgent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DataAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAgent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAgent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAnalyticsAgent. */ + interface IDataAnalyticsAgent { + + /** DataAnalyticsAgent stagingContext */ + stagingContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + + /** DataAnalyticsAgent publishedContext */ + publishedContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + + /** DataAnalyticsAgent lastPublishedContext */ + lastPublishedContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + } + + /** Represents a DataAnalyticsAgent. */ + class DataAnalyticsAgent implements IDataAnalyticsAgent { + + /** + * Constructs a new DataAnalyticsAgent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent); + + /** DataAnalyticsAgent stagingContext. */ + public stagingContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + + /** DataAnalyticsAgent publishedContext. */ + public publishedContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + + /** DataAnalyticsAgent lastPublishedContext. */ + public lastPublishedContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + + /** + * Creates a new DataAnalyticsAgent instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAnalyticsAgent instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent): google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent; + + /** + * Encodes the specified DataAnalyticsAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.verify|verify} messages. + * @param message DataAnalyticsAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAnalyticsAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.verify|verify} messages. + * @param message DataAnalyticsAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent; + + /** + * Verifies a DataAnalyticsAgent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAnalyticsAgent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAnalyticsAgent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent; + + /** + * Creates a plain object from a DataAnalyticsAgent message. Also converts values to other types if specified. + * @param message DataAnalyticsAgent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAnalyticsAgent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAnalyticsAgent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a DataAgentService */ + class DataAgentService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataAgentService 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 DataAgentService 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): DataAgentService; + + /** + * Calls ListDataAgents. + * @param request ListDataAgentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataAgentsResponse + */ + public listDataAgents(request: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListDataAgentsCallback): void; + + /** + * Calls ListDataAgents. + * @param request ListDataAgentsRequest message or plain object + * @returns Promise + */ + public listDataAgents(request: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest): Promise; + + /** + * Calls ListAccessibleDataAgents. + * @param request ListAccessibleDataAgentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAccessibleDataAgentsResponse + */ + public listAccessibleDataAgents(request: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListAccessibleDataAgentsCallback): void; + + /** + * Calls ListAccessibleDataAgents. + * @param request ListAccessibleDataAgentsRequest message or plain object + * @returns Promise + */ + public listAccessibleDataAgents(request: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest): Promise; + + /** + * Calls GetDataAgent. + * @param request GetDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataAgent + */ + public getDataAgent(request: google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetDataAgentCallback): void; + + /** + * Calls GetDataAgent. + * @param request GetDataAgentRequest message or plain object + * @returns Promise + */ + public getDataAgent(request: google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest): Promise; + + /** + * Calls CreateDataAgent. + * @param request CreateDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDataAgent(request: google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.CreateDataAgentCallback): void; + + /** + * Calls CreateDataAgent. + * @param request CreateDataAgentRequest message or plain object + * @returns Promise + */ + public createDataAgent(request: google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest): Promise; + + /** + * Calls UpdateDataAgent. + * @param request UpdateDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataAgent(request: google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.UpdateDataAgentCallback): void; + + /** + * Calls UpdateDataAgent. + * @param request UpdateDataAgentRequest message or plain object + * @returns Promise + */ + public updateDataAgent(request: google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest): Promise; + + /** + * Calls DeleteDataAgent. + * @param request DeleteDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataAgent(request: google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.DeleteDataAgentCallback): void; + + /** + * Calls DeleteDataAgent. + * @param request DeleteDataAgentRequest message or plain object + * @returns Promise + */ + public deleteDataAgent(request: google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataAgentService.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + } + + namespace DataAgentService { + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|listDataAgents}. + * @param error Error, if any + * @param [response] ListDataAgentsResponse + */ + type ListDataAgentsCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|listAccessibleDataAgents}. + * @param error Error, if any + * @param [response] ListAccessibleDataAgentsResponse + */ + type ListAccessibleDataAgentsCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|getDataAgent}. + * @param error Error, if any + * @param [response] DataAgent + */ + type GetDataAgentCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.DataAgent) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|createDataAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDataAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|updateDataAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|deleteDataAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDataAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + } + + /** Properties of a ListDataAgentsRequest. */ + interface IListDataAgentsRequest { + + /** ListDataAgentsRequest parent */ + parent?: (string|null); + + /** ListDataAgentsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataAgentsRequest pageToken */ + pageToken?: (string|null); + + /** ListDataAgentsRequest filter */ + filter?: (string|null); + + /** ListDataAgentsRequest orderBy */ + orderBy?: (string|null); + + /** ListDataAgentsRequest showDeleted */ + showDeleted?: (boolean|null); + } + + /** Represents a ListDataAgentsRequest. */ + class ListDataAgentsRequest implements IListDataAgentsRequest { + + /** + * Constructs a new ListDataAgentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest); + + /** ListDataAgentsRequest parent. */ + public parent: string; + + /** ListDataAgentsRequest pageSize. */ + public pageSize: number; + + /** ListDataAgentsRequest pageToken. */ + public pageToken: string; + + /** ListDataAgentsRequest filter. */ + public filter: string; + + /** ListDataAgentsRequest orderBy. */ + public orderBy: string; + + /** ListDataAgentsRequest showDeleted. */ + public showDeleted: boolean; + + /** + * Creates a new ListDataAgentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAgentsRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest; + + /** + * Encodes the specified ListDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest.verify|verify} messages. + * @param message ListDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest.verify|verify} messages. + * @param message ListDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest; + + /** + * Verifies a ListDataAgentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAgentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest; + + /** + * Creates a plain object from a ListDataAgentsRequest message. Also converts values to other types if specified. + * @param message ListDataAgentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAgentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAgentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataAgentsResponse. */ + interface IListDataAgentsResponse { + + /** ListDataAgentsResponse dataAgents */ + dataAgents?: (google.cloud.geminidataanalytics.v1alpha.IDataAgent[]|null); + + /** ListDataAgentsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataAgentsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataAgentsResponse. */ + class ListDataAgentsResponse implements IListDataAgentsResponse { + + /** + * Constructs a new ListDataAgentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse); + + /** ListDataAgentsResponse dataAgents. */ + public dataAgents: google.cloud.geminidataanalytics.v1alpha.IDataAgent[]; + + /** ListDataAgentsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataAgentsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataAgentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAgentsResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse; + + /** + * Encodes the specified ListDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse.verify|verify} messages. + * @param message ListDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse.verify|verify} messages. + * @param message ListDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse; + + /** + * Verifies a ListDataAgentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAgentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse; + + /** + * Creates a plain object from a ListDataAgentsResponse message. Also converts values to other types if specified. + * @param message ListDataAgentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAgentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAgentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccessibleDataAgentsRequest. */ + interface IListAccessibleDataAgentsRequest { + + /** ListAccessibleDataAgentsRequest parent */ + parent?: (string|null); + + /** ListAccessibleDataAgentsRequest pageSize */ + pageSize?: (number|null); + + /** ListAccessibleDataAgentsRequest pageToken */ + pageToken?: (string|null); + + /** ListAccessibleDataAgentsRequest filter */ + filter?: (string|null); + + /** ListAccessibleDataAgentsRequest orderBy */ + orderBy?: (string|null); + + /** ListAccessibleDataAgentsRequest showDeleted */ + showDeleted?: (boolean|null); + + /** ListAccessibleDataAgentsRequest creatorFilter */ + creatorFilter?: (google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter|keyof typeof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter|null); + } + + /** Represents a ListAccessibleDataAgentsRequest. */ + class ListAccessibleDataAgentsRequest implements IListAccessibleDataAgentsRequest { + + /** + * Constructs a new ListAccessibleDataAgentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest); + + /** ListAccessibleDataAgentsRequest parent. */ + public parent: string; + + /** ListAccessibleDataAgentsRequest pageSize. */ + public pageSize: number; + + /** ListAccessibleDataAgentsRequest pageToken. */ + public pageToken: string; + + /** ListAccessibleDataAgentsRequest filter. */ + public filter: string; + + /** ListAccessibleDataAgentsRequest orderBy. */ + public orderBy: string; + + /** ListAccessibleDataAgentsRequest showDeleted. */ + public showDeleted: boolean; + + /** ListAccessibleDataAgentsRequest creatorFilter. */ + public creatorFilter: (google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter|keyof typeof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter); + + /** + * Creates a new ListAccessibleDataAgentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccessibleDataAgentsRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @param message ListAccessibleDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @param message ListAccessibleDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest; + + /** + * Verifies a ListAccessibleDataAgentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccessibleDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccessibleDataAgentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest; + + /** + * Creates a plain object from a ListAccessibleDataAgentsRequest message. Also converts values to other types if specified. + * @param message ListAccessibleDataAgentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccessibleDataAgentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccessibleDataAgentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ListAccessibleDataAgentsRequest { + + /** CreatorFilter enum. */ + enum CreatorFilter { + CREATOR_FILTER_UNSPECIFIED = 0, + NONE = 1, + CREATOR_ONLY = 2, + NOT_CREATOR_ONLY = 3 + } + } + + /** Properties of a ListAccessibleDataAgentsResponse. */ + interface IListAccessibleDataAgentsResponse { + + /** ListAccessibleDataAgentsResponse dataAgents */ + dataAgents?: (google.cloud.geminidataanalytics.v1alpha.IDataAgent[]|null); + + /** ListAccessibleDataAgentsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAccessibleDataAgentsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAccessibleDataAgentsResponse. */ + class ListAccessibleDataAgentsResponse implements IListAccessibleDataAgentsResponse { + + /** + * Constructs a new ListAccessibleDataAgentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse); + + /** ListAccessibleDataAgentsResponse dataAgents. */ + public dataAgents: google.cloud.geminidataanalytics.v1alpha.IDataAgent[]; + + /** ListAccessibleDataAgentsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAccessibleDataAgentsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAccessibleDataAgentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccessibleDataAgentsResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @param message ListAccessibleDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @param message ListAccessibleDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse; + + /** + * Verifies a ListAccessibleDataAgentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccessibleDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccessibleDataAgentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse; + + /** + * Creates a plain object from a ListAccessibleDataAgentsResponse message. Also converts values to other types if specified. + * @param message ListAccessibleDataAgentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccessibleDataAgentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccessibleDataAgentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataAgentRequest. */ + interface IGetDataAgentRequest { + + /** GetDataAgentRequest name */ + name?: (string|null); + } + + /** Represents a GetDataAgentRequest. */ + class GetDataAgentRequest implements IGetDataAgentRequest { + + /** + * Constructs a new GetDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest); + + /** GetDataAgentRequest name. */ + public name: string; + + /** + * Creates a new GetDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest): google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest; + + /** + * Encodes the specified GetDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest.verify|verify} messages. + * @param message GetDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest.verify|verify} messages. + * @param message GetDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest; + + /** + * Verifies a GetDataAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest; + + /** + * Creates a plain object from a GetDataAgentRequest message. Also converts values to other types if specified. + * @param message GetDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDataAgentRequest. */ + interface ICreateDataAgentRequest { + + /** CreateDataAgentRequest parent */ + parent?: (string|null); + + /** CreateDataAgentRequest dataAgentId */ + dataAgentId?: (string|null); + + /** CreateDataAgentRequest dataAgent */ + dataAgent?: (google.cloud.geminidataanalytics.v1alpha.IDataAgent|null); + + /** CreateDataAgentRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateDataAgentRequest. */ + class CreateDataAgentRequest implements ICreateDataAgentRequest { + + /** + * Constructs a new CreateDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest); + + /** CreateDataAgentRequest parent. */ + public parent: string; + + /** CreateDataAgentRequest dataAgentId. */ + public dataAgentId: string; + + /** CreateDataAgentRequest dataAgent. */ + public dataAgent?: (google.cloud.geminidataanalytics.v1alpha.IDataAgent|null); + + /** CreateDataAgentRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest): google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest; + + /** + * Encodes the specified CreateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest.verify|verify} messages. + * @param message CreateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest.verify|verify} messages. + * @param message CreateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest; + + /** + * Verifies a CreateDataAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest; + + /** + * Creates a plain object from a CreateDataAgentRequest message. Also converts values to other types if specified. + * @param message CreateDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataAgentRequest. */ + interface IUpdateDataAgentRequest { + + /** UpdateDataAgentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAgentRequest dataAgent */ + dataAgent?: (google.cloud.geminidataanalytics.v1alpha.IDataAgent|null); + + /** UpdateDataAgentRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateDataAgentRequest. */ + class UpdateDataAgentRequest implements IUpdateDataAgentRequest { + + /** + * Constructs a new UpdateDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest); + + /** UpdateDataAgentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAgentRequest dataAgent. */ + public dataAgent?: (google.cloud.geminidataanalytics.v1alpha.IDataAgent|null); + + /** UpdateDataAgentRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest): google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest; + + /** + * Encodes the specified UpdateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest.verify|verify} messages. + * @param message UpdateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest.verify|verify} messages. + * @param message UpdateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest; + + /** + * Verifies an UpdateDataAgentRequest message. + * @param message Plain 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 UpdateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest; + + /** + * Creates a plain object from an UpdateDataAgentRequest message. Also converts values to other types if specified. + * @param message UpdateDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataAgentRequest. */ + interface IDeleteDataAgentRequest { + + /** DeleteDataAgentRequest name */ + name?: (string|null); + + /** DeleteDataAgentRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteDataAgentRequest. */ + class DeleteDataAgentRequest implements IDeleteDataAgentRequest { + + /** + * Constructs a new DeleteDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest); + + /** DeleteDataAgentRequest name. */ + public name: string; + + /** DeleteDataAgentRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest): google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest; + + /** + * Encodes the specified DeleteDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest.verify|verify} messages. + * @param message DeleteDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest.verify|verify} messages. + * @param message DeleteDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest; + + /** + * Verifies a DeleteDataAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest; + + /** + * Creates a plain object from a DeleteDataAgentRequest message. Also converts values to other types if specified. + * @param message DeleteDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.IOperationMetadata): google.cloud.geminidataanalytics.v1alpha.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a DataChatService */ + class DataChatService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataChatService 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 DataChatService 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): DataChatService; + + /** + * Calls Chat. + * @param request ChatRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Message + */ + public chat(request: google.cloud.geminidataanalytics.v1alpha.IChatRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataChatService.ChatCallback): void; + + /** + * Calls Chat. + * @param request ChatRequest message or plain object + * @returns Promise + */ + public chat(request: google.cloud.geminidataanalytics.v1alpha.IChatRequest): Promise; + + /** + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation + */ + public createConversation(request: google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataChatService.CreateConversationCallback): void; + + /** + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @returns Promise + */ + public createConversation(request: google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest): Promise; + + /** + * Calls DeleteConversation. + * @param request DeleteConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConversation(request: google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataChatService.DeleteConversationCallback): void; + + /** + * Calls DeleteConversation. + * @param request DeleteConversationRequest message or plain object + * @returns Promise + */ + public deleteConversation(request: google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest): Promise; + + /** + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation + */ + public getConversation(request: google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataChatService.GetConversationCallback): void; + + /** + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @returns Promise + */ + public getConversation(request: google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest): Promise; + + /** + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationsResponse + */ + public listConversations(request: google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataChatService.ListConversationsCallback): void; + + /** + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @returns Promise + */ + public listConversations(request: google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest): Promise; + + /** + * Calls ListMessages. + * @param request ListMessagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMessagesResponse + */ + public listMessages(request: google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, callback: google.cloud.geminidataanalytics.v1alpha.DataChatService.ListMessagesCallback): void; + + /** + * Calls ListMessages. + * @param request ListMessagesRequest message or plain object + * @returns Promise + */ + public listMessages(request: google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest): Promise; + } + + namespace DataChatService { + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|chat}. + * @param error Error, if any + * @param [response] Message + */ + type ChatCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.Message) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|createConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type CreateConversationCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|deleteConversation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConversationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|getConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type GetConversationCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|listConversations}. + * @param error Error, if any + * @param [response] ListConversationsResponse + */ + type ListConversationsCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|listMessages}. + * @param error Error, if any + * @param [response] ListMessagesResponse + */ + type ListMessagesCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse) => void; + } + + /** Properties of a ListMessagesRequest. */ + interface IListMessagesRequest { + + /** ListMessagesRequest parent */ + parent?: (string|null); + + /** ListMessagesRequest pageSize */ + pageSize?: (number|null); + + /** ListMessagesRequest pageToken */ + pageToken?: (string|null); + + /** ListMessagesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListMessagesRequest. */ + class ListMessagesRequest implements IListMessagesRequest { + + /** + * Constructs a new ListMessagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest); + + /** ListMessagesRequest parent. */ + public parent: string; + + /** ListMessagesRequest pageSize. */ + public pageSize: number; + + /** ListMessagesRequest pageToken. */ + public pageToken: string; + + /** ListMessagesRequest filter. */ + public filter: string; + + /** + * Creates a new ListMessagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessagesRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest): google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest; + + /** + * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest.verify|verify} messages. + * @param message ListMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest.verify|verify} messages. + * @param message ListMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest; + + /** + * Verifies a ListMessagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest; + + /** + * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. + * @param message ListMessagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMessagesResponse. */ + interface IListMessagesResponse { + + /** ListMessagesResponse messages */ + messages?: (google.cloud.geminidataanalytics.v1alpha.IStorageMessage[]|null); + + /** ListMessagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMessagesResponse. */ + class ListMessagesResponse implements IListMessagesResponse { + + /** + * Constructs a new ListMessagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse); + + /** ListMessagesResponse messages. */ + public messages: google.cloud.geminidataanalytics.v1alpha.IStorageMessage[]; + + /** ListMessagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMessagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessagesResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse): google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse; + + /** + * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse.verify|verify} messages. + * @param message ListMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse.verify|verify} messages. + * @param message ListMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse; + + /** + * Verifies a ListMessagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse; + + /** + * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * @param message ListMessagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StorageMessage. */ + interface IStorageMessage { + + /** StorageMessage messageId */ + messageId?: (string|null); + + /** StorageMessage message */ + message?: (google.cloud.geminidataanalytics.v1alpha.IMessage|null); + } + + /** Represents a StorageMessage. */ + class StorageMessage implements IStorageMessage { + + /** + * Constructs a new StorageMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IStorageMessage); + + /** StorageMessage messageId. */ + public messageId: string; + + /** StorageMessage message. */ + public message?: (google.cloud.geminidataanalytics.v1alpha.IMessage|null); + + /** + * Creates a new StorageMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IStorageMessage): google.cloud.geminidataanalytics.v1alpha.StorageMessage; + + /** + * Encodes the specified StorageMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StorageMessage.verify|verify} messages. + * @param message StorageMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IStorageMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StorageMessage.verify|verify} messages. + * @param message StorageMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IStorageMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.StorageMessage; + + /** + * Decodes a StorageMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.StorageMessage; + + /** + * Verifies a StorageMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.StorageMessage; + + /** + * Creates a plain object from a StorageMessage message. Also converts values to other types if specified. + * @param message StorageMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.StorageMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChatRequest. */ + interface IChatRequest { + + /** ChatRequest inlineContext */ + inlineContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + + /** ChatRequest conversationReference */ + conversationReference?: (google.cloud.geminidataanalytics.v1alpha.IConversationReference|null); + + /** ChatRequest dataAgentContext */ + dataAgentContext?: (google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null); + + /** ChatRequest project */ + project?: (string|null); + + /** ChatRequest parent */ + parent?: (string|null); + + /** ChatRequest messages */ + messages?: (google.cloud.geminidataanalytics.v1alpha.IMessage[]|null); + } + + /** Represents a ChatRequest. */ + class ChatRequest implements IChatRequest { + + /** + * Constructs a new ChatRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IChatRequest); + + /** ChatRequest inlineContext. */ + public inlineContext?: (google.cloud.geminidataanalytics.v1alpha.IContext|null); + + /** ChatRequest conversationReference. */ + public conversationReference?: (google.cloud.geminidataanalytics.v1alpha.IConversationReference|null); + + /** ChatRequest dataAgentContext. */ + public dataAgentContext?: (google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null); + + /** ChatRequest project. */ + public project: string; + + /** ChatRequest parent. */ + public parent: string; + + /** ChatRequest messages. */ + public messages: google.cloud.geminidataanalytics.v1alpha.IMessage[]; + + /** ChatRequest contextProvider. */ + public contextProvider?: ("inlineContext"|"conversationReference"|"dataAgentContext"); + + /** + * Creates a new ChatRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ChatRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IChatRequest): google.cloud.geminidataanalytics.v1alpha.ChatRequest; + + /** + * Encodes the specified ChatRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChatRequest.verify|verify} messages. + * @param message ChatRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IChatRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChatRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChatRequest.verify|verify} messages. + * @param message ChatRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IChatRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChatRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChatRequest; + + /** + * Decodes a ChatRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChatRequest; + + /** + * Verifies a ChatRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChatRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChatRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChatRequest; + + /** + * Creates a plain object from a ChatRequest message. Also converts values to other types if specified. + * @param message ChatRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChatRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChatRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChatRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAgentContext. */ + interface IDataAgentContext { + + /** DataAgentContext dataAgent */ + dataAgent?: (string|null); + + /** DataAgentContext credentials */ + credentials?: (google.cloud.geminidataanalytics.v1alpha.ICredentials|null); + + /** DataAgentContext contextVersion */ + contextVersion?: (google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion|keyof typeof google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion|null); + } + + /** Represents a DataAgentContext. */ + class DataAgentContext implements IDataAgentContext { + + /** + * Constructs a new DataAgentContext. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDataAgentContext); + + /** DataAgentContext dataAgent. */ + public dataAgent: string; + + /** DataAgentContext credentials. */ + public credentials?: (google.cloud.geminidataanalytics.v1alpha.ICredentials|null); + + /** DataAgentContext contextVersion. */ + public contextVersion: (google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion|keyof typeof google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion); + + /** + * Creates a new DataAgentContext instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAgentContext instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDataAgentContext): google.cloud.geminidataanalytics.v1alpha.DataAgentContext; + + /** + * Encodes the specified DataAgentContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgentContext.verify|verify} messages. + * @param message DataAgentContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDataAgentContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAgentContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgentContext.verify|verify} messages. + * @param message DataAgentContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDataAgentContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DataAgentContext; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DataAgentContext; + + /** + * Verifies a DataAgentContext message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAgentContext message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAgentContext + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DataAgentContext; + + /** + * Creates a plain object from a DataAgentContext message. Also converts values to other types if specified. + * @param message DataAgentContext + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DataAgentContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAgentContext to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAgentContext + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataAgentContext { + + /** ContextVersion enum. */ + enum ContextVersion { + CONTEXT_VERSION_UNSPECIFIED = 0, + STAGING = 1, + PUBLISHED = 2 + } + } + + /** Properties of a ConversationReference. */ + interface IConversationReference { + + /** ConversationReference conversation */ + conversation?: (string|null); + + /** ConversationReference dataAgentContext */ + dataAgentContext?: (google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null); + } + + /** Represents a ConversationReference. */ + class ConversationReference implements IConversationReference { + + /** + * Constructs a new ConversationReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IConversationReference); + + /** ConversationReference conversation. */ + public conversation: string; + + /** ConversationReference dataAgentContext. */ + public dataAgentContext?: (google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null); + + /** + * Creates a new ConversationReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IConversationReference): google.cloud.geminidataanalytics.v1alpha.ConversationReference; + + /** + * Encodes the specified ConversationReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationReference.verify|verify} messages. + * @param message ConversationReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IConversationReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationReference.verify|verify} messages. + * @param message ConversationReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IConversationReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ConversationReference; + + /** + * Decodes a ConversationReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ConversationReference; + + /** + * Verifies a ConversationReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ConversationReference; + + /** + * Creates a plain object from a ConversationReference message. Also converts values to other types if specified. + * @param message ConversationReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ConversationReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Message. */ + interface IMessage { + + /** Message userMessage */ + userMessage?: (google.cloud.geminidataanalytics.v1alpha.IUserMessage|null); + + /** Message systemMessage */ + systemMessage?: (google.cloud.geminidataanalytics.v1alpha.ISystemMessage|null); + + /** Message timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** Message messageId */ + messageId?: (string|null); + } + + /** Represents a Message. */ + class Message implements IMessage { + + /** + * Constructs a new Message. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IMessage); + + /** Message userMessage. */ + public userMessage?: (google.cloud.geminidataanalytics.v1alpha.IUserMessage|null); + + /** Message systemMessage. */ + public systemMessage?: (google.cloud.geminidataanalytics.v1alpha.ISystemMessage|null); + + /** Message timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** Message messageId. */ + public messageId: string; + + /** Message kind. */ + public kind?: ("userMessage"|"systemMessage"); + + /** + * Creates a new Message instance using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IMessage): google.cloud.geminidataanalytics.v1alpha.Message; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Message message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Message; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Message; + + /** + * Verifies a Message message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Message + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Message; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @param message Message + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Message to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Message + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserMessage. */ + interface IUserMessage { + + /** UserMessage text */ + text?: (string|null); + } + + /** Represents a UserMessage. */ + class UserMessage implements IUserMessage { + + /** + * Constructs a new UserMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IUserMessage); + + /** UserMessage text. */ + public text?: (string|null); + + /** UserMessage kind. */ + public kind?: "text"; + + /** + * Creates a new UserMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns UserMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IUserMessage): google.cloud.geminidataanalytics.v1alpha.UserMessage; + + /** + * Encodes the specified UserMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UserMessage.verify|verify} messages. + * @param message UserMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IUserMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UserMessage.verify|verify} messages. + * @param message UserMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IUserMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.UserMessage; + + /** + * Decodes a UserMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.UserMessage; + + /** + * Verifies a UserMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.UserMessage; + + /** + * Creates a plain object from a UserMessage message. Also converts values to other types if specified. + * @param message UserMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.UserMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SystemMessage. */ + interface ISystemMessage { + + /** SystemMessage text */ + text?: (google.cloud.geminidataanalytics.v1alpha.ITextMessage|null); + + /** SystemMessage schema */ + schema?: (google.cloud.geminidataanalytics.v1alpha.ISchemaMessage|null); + + /** SystemMessage data */ + data?: (google.cloud.geminidataanalytics.v1alpha.IDataMessage|null); + + /** SystemMessage analysis */ + analysis?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage|null); + + /** SystemMessage chart */ + chart?: (google.cloud.geminidataanalytics.v1alpha.IChartMessage|null); + + /** SystemMessage error */ + error?: (google.cloud.geminidataanalytics.v1alpha.IErrorMessage|null); + + /** SystemMessage exampleQueries */ + exampleQueries?: (google.cloud.geminidataanalytics.v1alpha.IExampleQueries|null); + + /** SystemMessage groupId */ + groupId?: (number|null); + } + + /** Represents a SystemMessage. */ + class SystemMessage implements ISystemMessage { + + /** + * Constructs a new SystemMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ISystemMessage); + + /** SystemMessage text. */ + public text?: (google.cloud.geminidataanalytics.v1alpha.ITextMessage|null); + + /** SystemMessage schema. */ + public schema?: (google.cloud.geminidataanalytics.v1alpha.ISchemaMessage|null); + + /** SystemMessage data. */ + public data?: (google.cloud.geminidataanalytics.v1alpha.IDataMessage|null); + + /** SystemMessage analysis. */ + public analysis?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage|null); + + /** SystemMessage chart. */ + public chart?: (google.cloud.geminidataanalytics.v1alpha.IChartMessage|null); + + /** SystemMessage error. */ + public error?: (google.cloud.geminidataanalytics.v1alpha.IErrorMessage|null); + + /** SystemMessage exampleQueries. */ + public exampleQueries?: (google.cloud.geminidataanalytics.v1alpha.IExampleQueries|null); + + /** SystemMessage groupId. */ + public groupId?: (number|null); + + /** SystemMessage kind. */ + public kind?: ("text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"); + + /** + * Creates a new SystemMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ISystemMessage): google.cloud.geminidataanalytics.v1alpha.SystemMessage; + + /** + * Encodes the specified SystemMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SystemMessage.verify|verify} messages. + * @param message SystemMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ISystemMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SystemMessage.verify|verify} messages. + * @param message SystemMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ISystemMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.SystemMessage; + + /** + * Decodes a SystemMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.SystemMessage; + + /** + * Verifies a SystemMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.SystemMessage; + + /** + * Creates a plain object from a SystemMessage message. Also converts values to other types if specified. + * @param message SystemMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.SystemMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TextMessage. */ + interface ITextMessage { + + /** TextMessage parts */ + parts?: (string[]|null); + + /** TextMessage textType */ + textType?: (google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|keyof typeof google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|null); + } + + /** Represents a TextMessage. */ + class TextMessage implements ITextMessage { + + /** + * Constructs a new TextMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ITextMessage); + + /** TextMessage parts. */ + public parts: string[]; + + /** TextMessage textType. */ + public textType: (google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|keyof typeof google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType); + + /** + * Creates a new TextMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns TextMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ITextMessage): google.cloud.geminidataanalytics.v1alpha.TextMessage; + + /** + * Encodes the specified TextMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.TextMessage.verify|verify} messages. + * @param message TextMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ITextMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.TextMessage.verify|verify} messages. + * @param message TextMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ITextMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.TextMessage; + + /** + * Decodes a TextMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.TextMessage; + + /** + * Verifies a TextMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.TextMessage; + + /** + * Creates a plain object from a TextMessage message. Also converts values to other types if specified. + * @param message TextMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.TextMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TextMessage { + + /** TextType enum. */ + enum TextType { + TEXT_TYPE_UNSPECIFIED = 0, + FINAL_RESPONSE = 1, + THOUGHT = 2 + } + } + + /** Properties of a SchemaMessage. */ + interface ISchemaMessage { + + /** SchemaMessage query */ + query?: (google.cloud.geminidataanalytics.v1alpha.ISchemaQuery|null); + + /** SchemaMessage result */ + result?: (google.cloud.geminidataanalytics.v1alpha.ISchemaResult|null); + } + + /** Represents a SchemaMessage. */ + class SchemaMessage implements ISchemaMessage { + + /** + * Constructs a new SchemaMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ISchemaMessage); + + /** SchemaMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1alpha.ISchemaQuery|null); + + /** SchemaMessage result. */ + public result?: (google.cloud.geminidataanalytics.v1alpha.ISchemaResult|null); + + /** SchemaMessage kind. */ + public kind?: ("query"|"result"); + + /** + * Creates a new SchemaMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ISchemaMessage): google.cloud.geminidataanalytics.v1alpha.SchemaMessage; + + /** + * Encodes the specified SchemaMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaMessage.verify|verify} messages. + * @param message SchemaMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ISchemaMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaMessage.verify|verify} messages. + * @param message SchemaMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ISchemaMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.SchemaMessage; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.SchemaMessage; + + /** + * Verifies a SchemaMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.SchemaMessage; + + /** + * Creates a plain object from a SchemaMessage message. Also converts values to other types if specified. + * @param message SchemaMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.SchemaMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaQuery. */ + interface ISchemaQuery { + + /** SchemaQuery question */ + question?: (string|null); + } + + /** Represents a SchemaQuery. */ + class SchemaQuery implements ISchemaQuery { + + /** + * Constructs a new SchemaQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ISchemaQuery); + + /** SchemaQuery question. */ + public question: string; + + /** + * Creates a new SchemaQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ISchemaQuery): google.cloud.geminidataanalytics.v1alpha.SchemaQuery; + + /** + * Encodes the specified SchemaQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaQuery.verify|verify} messages. + * @param message SchemaQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ISchemaQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaQuery.verify|verify} messages. + * @param message SchemaQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ISchemaQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.SchemaQuery; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.SchemaQuery; + + /** + * Verifies a SchemaQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.SchemaQuery; + + /** + * Creates a plain object from a SchemaQuery message. Also converts values to other types if specified. + * @param message SchemaQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.SchemaQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaResult. */ + interface ISchemaResult { + + /** SchemaResult datasources */ + datasources?: (google.cloud.geminidataanalytics.v1alpha.IDatasource[]|null); + } + + /** Represents a SchemaResult. */ + class SchemaResult implements ISchemaResult { + + /** + * Constructs a new SchemaResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ISchemaResult); + + /** SchemaResult datasources. */ + public datasources: google.cloud.geminidataanalytics.v1alpha.IDatasource[]; + + /** + * Creates a new SchemaResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaResult instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ISchemaResult): google.cloud.geminidataanalytics.v1alpha.SchemaResult; + + /** + * Encodes the specified SchemaResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaResult.verify|verify} messages. + * @param message SchemaResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ISchemaResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaResult.verify|verify} messages. + * @param message SchemaResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ISchemaResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.SchemaResult; + + /** + * Decodes a SchemaResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.SchemaResult; + + /** + * Verifies a SchemaResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.SchemaResult; + + /** + * Creates a plain object from a SchemaResult message. Also converts values to other types if specified. + * @param message SchemaResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.SchemaResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataMessage. */ + interface IDataMessage { + + /** DataMessage query */ + query?: (google.cloud.geminidataanalytics.v1alpha.IDataQuery|null); + + /** DataMessage generatedSql */ + generatedSql?: (string|null); + + /** DataMessage result */ + result?: (google.cloud.geminidataanalytics.v1alpha.IDataResult|null); + + /** DataMessage generatedLookerQuery */ + generatedLookerQuery?: (google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null); + + /** DataMessage bigQueryJob */ + bigQueryJob?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryJob|null); + } + + /** Represents a DataMessage. */ + class DataMessage implements IDataMessage { + + /** + * Constructs a new DataMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDataMessage); + + /** DataMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1alpha.IDataQuery|null); + + /** DataMessage generatedSql. */ + public generatedSql?: (string|null); + + /** DataMessage result. */ + public result?: (google.cloud.geminidataanalytics.v1alpha.IDataResult|null); + + /** DataMessage generatedLookerQuery. */ + public generatedLookerQuery?: (google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null); + + /** DataMessage bigQueryJob. */ + public bigQueryJob?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryJob|null); + + /** DataMessage kind. */ + public kind?: ("query"|"generatedSql"|"result"|"generatedLookerQuery"|"bigQueryJob"); + + /** + * Creates a new DataMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns DataMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDataMessage): google.cloud.geminidataanalytics.v1alpha.DataMessage; + + /** + * Encodes the specified DataMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataMessage.verify|verify} messages. + * @param message DataMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDataMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataMessage.verify|verify} messages. + * @param message DataMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDataMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DataMessage; + + /** + * Decodes a DataMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DataMessage; + + /** + * Verifies a DataMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DataMessage; + + /** + * Creates a plain object from a DataMessage message. Also converts values to other types if specified. + * @param message DataMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DataMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookerQuery. */ + interface ILookerQuery { + + /** LookerQuery model */ + model?: (string|null); + + /** LookerQuery explore */ + explore?: (string|null); + + /** LookerQuery fields */ + fields?: (string[]|null); + + /** LookerQuery filters */ + filters?: (google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter[]|null); + + /** LookerQuery sorts */ + sorts?: (string[]|null); + + /** LookerQuery limit */ + limit?: (string|null); + } + + /** Represents a LookerQuery. */ + class LookerQuery implements ILookerQuery { + + /** + * Constructs a new LookerQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.ILookerQuery); + + /** LookerQuery model. */ + public model: string; + + /** LookerQuery explore. */ + public explore: string; + + /** LookerQuery fields. */ + public fields: string[]; + + /** LookerQuery filters. */ + public filters: google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter[]; + + /** LookerQuery sorts. */ + public sorts: string[]; + + /** LookerQuery limit. */ + public limit?: (string|null); + + /** + * Creates a new LookerQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.ILookerQuery): google.cloud.geminidataanalytics.v1alpha.LookerQuery; + + /** + * Encodes the specified LookerQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.verify|verify} messages. + * @param message LookerQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.ILookerQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.verify|verify} messages. + * @param message LookerQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.ILookerQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.LookerQuery; + + /** + * Decodes a LookerQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.LookerQuery; + + /** + * Verifies a LookerQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.LookerQuery; + + /** + * Creates a plain object from a LookerQuery message. Also converts values to other types if specified. + * @param message LookerQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.LookerQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LookerQuery { + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter field */ + field?: (string|null); + + /** Filter value */ + value?: (string|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter); + + /** Filter field. */ + public field: string; + + /** Filter value. */ + public value: string; + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter): google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter; + + /** + * Verifies a Filter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataQuery. */ + interface IDataQuery { + + /** DataQuery looker */ + looker?: (google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null); + + /** DataQuery question */ + question?: (string|null); + + /** DataQuery name */ + name?: (string|null); + + /** DataQuery datasources */ + datasources?: (google.cloud.geminidataanalytics.v1alpha.IDatasource[]|null); + } + + /** Represents a DataQuery. */ + class DataQuery implements IDataQuery { + + /** + * Constructs a new DataQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDataQuery); + + /** DataQuery looker. */ + public looker?: (google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null); + + /** DataQuery question. */ + public question: string; + + /** DataQuery name. */ + public name: string; + + /** DataQuery datasources. */ + public datasources: google.cloud.geminidataanalytics.v1alpha.IDatasource[]; + + /** DataQuery queryType. */ + public queryType?: "looker"; + + /** + * Creates a new DataQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDataQuery): google.cloud.geminidataanalytics.v1alpha.DataQuery; + + /** + * Encodes the specified DataQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataQuery.verify|verify} messages. + * @param message DataQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDataQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataQuery.verify|verify} messages. + * @param message DataQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDataQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DataQuery; + + /** + * Decodes a DataQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DataQuery; + + /** + * Verifies a DataQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DataQuery; + + /** + * Creates a plain object from a DataQuery message. Also converts values to other types if specified. + * @param message DataQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DataQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataResult. */ + interface IDataResult { + + /** DataResult name */ + name?: (string|null); + + /** DataResult schema */ + schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + + /** DataResult data */ + data?: (google.protobuf.IStruct[]|null); + } + + /** Represents a DataResult. */ + class DataResult implements IDataResult { + + /** + * Constructs a new DataResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IDataResult); + + /** DataResult name. */ + public name: string; + + /** DataResult schema. */ + public schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + + /** DataResult data. */ + public data: google.protobuf.IStruct[]; + + /** + * Creates a new DataResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataResult instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IDataResult): google.cloud.geminidataanalytics.v1alpha.DataResult; + + /** + * Encodes the specified DataResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataResult.verify|verify} messages. + * @param message DataResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IDataResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataResult.verify|verify} messages. + * @param message DataResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IDataResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.DataResult; + + /** + * Decodes a DataResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.DataResult; + + /** + * Verifies a DataResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.DataResult; + + /** + * Creates a plain object from a DataResult message. Also converts values to other types if specified. + * @param message DataResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.DataResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryJob. */ + interface IBigQueryJob { + + /** BigQueryJob projectId */ + projectId?: (string|null); + + /** BigQueryJob jobId */ + jobId?: (string|null); + + /** BigQueryJob location */ + location?: (string|null); + + /** BigQueryJob destinationTable */ + destinationTable?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null); + + /** BigQueryJob schema */ + schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + } + + /** Represents a BigQueryJob. */ + class BigQueryJob implements IBigQueryJob { + + /** + * Constructs a new BigQueryJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IBigQueryJob); + + /** BigQueryJob projectId. */ + public projectId: string; + + /** BigQueryJob jobId. */ + public jobId: string; + + /** BigQueryJob location. */ + public location: string; + + /** BigQueryJob destinationTable. */ + public destinationTable?: (google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null); + + /** BigQueryJob schema. */ + public schema?: (google.cloud.geminidataanalytics.v1alpha.ISchema|null); + + /** + * Creates a new BigQueryJob instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryJob instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IBigQueryJob): google.cloud.geminidataanalytics.v1alpha.BigQueryJob; + + /** + * Encodes the specified BigQueryJob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryJob.verify|verify} messages. + * @param message BigQueryJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IBigQueryJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryJob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryJob.verify|verify} messages. + * @param message BigQueryJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IBigQueryJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.BigQueryJob; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.BigQueryJob; + + /** + * Verifies a BigQueryJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.BigQueryJob; + + /** + * Creates a plain object from a BigQueryJob message. Also converts values to other types if specified. + * @param message BigQueryJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.BigQueryJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisMessage. */ + interface IAnalysisMessage { + + /** AnalysisMessage query */ + query?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery|null); + + /** AnalysisMessage progressEvent */ + progressEvent?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent|null); + } + + /** Represents an AnalysisMessage. */ + class AnalysisMessage implements IAnalysisMessage { + + /** + * Constructs a new AnalysisMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage); + + /** AnalysisMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery|null); + + /** AnalysisMessage progressEvent. */ + public progressEvent?: (google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent|null); + + /** AnalysisMessage kind. */ + public kind?: ("query"|"progressEvent"); + + /** + * Creates a new AnalysisMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage): google.cloud.geminidataanalytics.v1alpha.AnalysisMessage; + + /** + * Encodes the specified AnalysisMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.verify|verify} messages. + * @param message AnalysisMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.verify|verify} messages. + * @param message AnalysisMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.AnalysisMessage; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.AnalysisMessage; + + /** + * Verifies an AnalysisMessage message. + * @param message Plain 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 AnalysisMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.AnalysisMessage; + + /** + * Creates a plain object from an AnalysisMessage message. Also converts values to other types if specified. + * @param message AnalysisMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.AnalysisMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisQuery. */ + interface IAnalysisQuery { + + /** AnalysisQuery question */ + question?: (string|null); + + /** AnalysisQuery dataResultNames */ + dataResultNames?: (string[]|null); + } + + /** Represents an AnalysisQuery. */ + class AnalysisQuery implements IAnalysisQuery { + + /** + * Constructs a new AnalysisQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery); + + /** AnalysisQuery question. */ + public question: string; + + /** AnalysisQuery dataResultNames. */ + public dataResultNames: string[]; + + /** + * Creates a new AnalysisQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery): google.cloud.geminidataanalytics.v1alpha.AnalysisQuery; + + /** + * Encodes the specified AnalysisQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.verify|verify} messages. + * @param message AnalysisQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.verify|verify} messages. + * @param message AnalysisQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.AnalysisQuery; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.AnalysisQuery; + + /** + * Verifies an AnalysisQuery message. + * @param message Plain 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 AnalysisQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.AnalysisQuery; + + /** + * Creates a plain object from an AnalysisQuery message. Also converts values to other types if specified. + * @param message AnalysisQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.AnalysisQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisEvent. */ + interface IAnalysisEvent { + + /** AnalysisEvent plannerReasoning */ + plannerReasoning?: (string|null); + + /** AnalysisEvent coderInstruction */ + coderInstruction?: (string|null); + + /** AnalysisEvent code */ + code?: (string|null); + + /** AnalysisEvent executionOutput */ + executionOutput?: (string|null); + + /** AnalysisEvent executionError */ + executionError?: (string|null); + + /** AnalysisEvent resultVegaChartJson */ + resultVegaChartJson?: (string|null); + + /** AnalysisEvent resultNaturalLanguage */ + resultNaturalLanguage?: (string|null); + + /** AnalysisEvent resultCsvData */ + resultCsvData?: (string|null); + + /** AnalysisEvent resultReferenceData */ + resultReferenceData?: (string|null); + + /** AnalysisEvent error */ + error?: (string|null); + } + + /** Represents an AnalysisEvent. */ + class AnalysisEvent implements IAnalysisEvent { + + /** + * Constructs a new AnalysisEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent); + + /** AnalysisEvent plannerReasoning. */ + public plannerReasoning?: (string|null); + + /** AnalysisEvent coderInstruction. */ + public coderInstruction?: (string|null); + + /** AnalysisEvent code. */ + public code?: (string|null); + + /** AnalysisEvent executionOutput. */ + public executionOutput?: (string|null); + + /** AnalysisEvent executionError. */ + public executionError?: (string|null); + + /** AnalysisEvent resultVegaChartJson. */ + public resultVegaChartJson?: (string|null); + + /** AnalysisEvent resultNaturalLanguage. */ + public resultNaturalLanguage?: (string|null); + + /** AnalysisEvent resultCsvData. */ + public resultCsvData?: (string|null); + + /** AnalysisEvent resultReferenceData. */ + public resultReferenceData?: (string|null); + + /** AnalysisEvent error. */ + public error?: (string|null); + + /** AnalysisEvent kind. */ + public kind?: ("plannerReasoning"|"coderInstruction"|"code"|"executionOutput"|"executionError"|"resultVegaChartJson"|"resultNaturalLanguage"|"resultCsvData"|"resultReferenceData"|"error"); + + /** + * Creates a new AnalysisEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisEvent instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent): google.cloud.geminidataanalytics.v1alpha.AnalysisEvent; + + /** + * Encodes the specified AnalysisEvent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.verify|verify} messages. + * @param message AnalysisEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisEvent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.verify|verify} messages. + * @param message AnalysisEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.AnalysisEvent; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.AnalysisEvent; + + /** + * Verifies an AnalysisEvent message. + * @param message Plain 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 AnalysisEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.AnalysisEvent; + + /** + * Creates a plain object from an AnalysisEvent message. Also converts values to other types if specified. + * @param message AnalysisEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.AnalysisEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartMessage. */ + interface IChartMessage { + + /** ChartMessage query */ + query?: (google.cloud.geminidataanalytics.v1alpha.IChartQuery|null); + + /** ChartMessage result */ + result?: (google.cloud.geminidataanalytics.v1alpha.IChartResult|null); + } + + /** Represents a ChartMessage. */ + class ChartMessage implements IChartMessage { + + /** + * Constructs a new ChartMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IChartMessage); + + /** ChartMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1alpha.IChartQuery|null); + + /** ChartMessage result. */ + public result?: (google.cloud.geminidataanalytics.v1alpha.IChartResult|null); + + /** ChartMessage kind. */ + public kind?: ("query"|"result"); + + /** + * Creates a new ChartMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IChartMessage): google.cloud.geminidataanalytics.v1alpha.ChartMessage; + + /** + * Encodes the specified ChartMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartMessage.verify|verify} messages. + * @param message ChartMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IChartMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartMessage.verify|verify} messages. + * @param message ChartMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IChartMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChartMessage; + + /** + * Decodes a ChartMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChartMessage; + + /** + * Verifies a ChartMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChartMessage; + + /** + * Creates a plain object from a ChartMessage message. Also converts values to other types if specified. + * @param message ChartMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChartMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartQuery. */ + interface IChartQuery { + + /** ChartQuery instructions */ + instructions?: (string|null); + + /** ChartQuery dataResultName */ + dataResultName?: (string|null); + } + + /** Represents a ChartQuery. */ + class ChartQuery implements IChartQuery { + + /** + * Constructs a new ChartQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IChartQuery); + + /** ChartQuery instructions. */ + public instructions: string; + + /** ChartQuery dataResultName. */ + public dataResultName: string; + + /** + * Creates a new ChartQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IChartQuery): google.cloud.geminidataanalytics.v1alpha.ChartQuery; + + /** + * Encodes the specified ChartQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartQuery.verify|verify} messages. + * @param message ChartQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IChartQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartQuery.verify|verify} messages. + * @param message ChartQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IChartQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChartQuery; + + /** + * Decodes a ChartQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChartQuery; + + /** + * Verifies a ChartQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChartQuery; + + /** + * Creates a plain object from a ChartQuery message. Also converts values to other types if specified. + * @param message ChartQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChartQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartResult. */ + interface IChartResult { + + /** ChartResult vegaConfig */ + vegaConfig?: (google.protobuf.IStruct|null); + + /** ChartResult image */ + image?: (google.cloud.geminidataanalytics.v1alpha.IBlob|null); + } + + /** Represents a ChartResult. */ + class ChartResult implements IChartResult { + + /** + * Constructs a new ChartResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IChartResult); + + /** ChartResult vegaConfig. */ + public vegaConfig?: (google.protobuf.IStruct|null); + + /** ChartResult image. */ + public image?: (google.cloud.geminidataanalytics.v1alpha.IBlob|null); + + /** + * Creates a new ChartResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartResult instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IChartResult): google.cloud.geminidataanalytics.v1alpha.ChartResult; + + /** + * Encodes the specified ChartResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartResult.verify|verify} messages. + * @param message ChartResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IChartResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartResult.verify|verify} messages. + * @param message ChartResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IChartResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ChartResult; + + /** + * Decodes a ChartResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ChartResult; + + /** + * Verifies a ChartResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ChartResult; + + /** + * Creates a plain object from a ChartResult message. Also converts values to other types if specified. + * @param message ChartResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ChartResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorMessage. */ + interface IErrorMessage { + + /** ErrorMessage text */ + text?: (string|null); + } + + /** Represents an ErrorMessage. */ + class ErrorMessage implements IErrorMessage { + + /** + * Constructs a new ErrorMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IErrorMessage); + + /** ErrorMessage text. */ + public text: string; + + /** + * Creates a new ErrorMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IErrorMessage): google.cloud.geminidataanalytics.v1alpha.ErrorMessage; + + /** + * Encodes the specified ErrorMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ErrorMessage.verify|verify} messages. + * @param message ErrorMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ErrorMessage.verify|verify} messages. + * @param message ErrorMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ErrorMessage; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ErrorMessage; + + /** + * Verifies an ErrorMessage message. + * @param message Plain 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 ErrorMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ErrorMessage; + + /** + * Creates a plain object from an ErrorMessage message. Also converts values to other types if specified. + * @param message ErrorMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ErrorMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExampleQueries. */ + interface IExampleQueries { + + /** ExampleQueries exampleQueries */ + exampleQueries?: (google.cloud.geminidataanalytics.v1alpha.IExampleQuery[]|null); + } + + /** Represents an ExampleQueries. */ + class ExampleQueries implements IExampleQueries { + + /** + * Constructs a new ExampleQueries. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IExampleQueries); + + /** ExampleQueries exampleQueries. */ + public exampleQueries: google.cloud.geminidataanalytics.v1alpha.IExampleQuery[]; + + /** + * Creates a new ExampleQueries instance using the specified properties. + * @param [properties] Properties to set + * @returns ExampleQueries instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IExampleQueries): google.cloud.geminidataanalytics.v1alpha.ExampleQueries; + + /** + * Encodes the specified ExampleQueries message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. + * @param message ExampleQueries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IExampleQueries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExampleQueries message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. + * @param message ExampleQueries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IExampleQueries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExampleQueries message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExampleQueries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ExampleQueries; + + /** + * Decodes an ExampleQueries message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExampleQueries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ExampleQueries; + + /** + * Verifies an ExampleQueries message. + * @param message Plain 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 ExampleQueries message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExampleQueries + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ExampleQueries; + + /** + * Creates a plain object from an ExampleQueries message. Also converts values to other types if specified. + * @param message ExampleQueries + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ExampleQueries, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExampleQueries to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExampleQueries + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Blob. */ + interface IBlob { + + /** Blob mimeType */ + mimeType?: (string|null); + + /** Blob data */ + data?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Blob. */ + class Blob implements IBlob { + + /** + * Constructs a new Blob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IBlob); + + /** Blob mimeType. */ + public mimeType: string; + + /** Blob data. */ + public data: (Uint8Array|Buffer|string); + + /** + * Creates a new Blob instance using the specified properties. + * @param [properties] Properties to set + * @returns Blob instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IBlob): google.cloud.geminidataanalytics.v1alpha.Blob; + + /** + * Encodes the specified Blob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. + * @param message Blob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Blob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. + * @param message Blob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Blob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.Blob; + + /** + * Decodes a Blob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.Blob; + + /** + * Verifies a Blob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Blob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Blob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.Blob; + + /** + * Creates a plain object from a Blob message. Also converts values to other types if specified. + * @param message Blob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.Blob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Blob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Blob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace v1beta. */ + namespace v1beta { + + /** Properties of a Context. */ + interface IContext { + + /** Context systemInstruction */ + systemInstruction?: (string|null); + + /** Context datasourceReferences */ + datasourceReferences?: (google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null); + + /** Context options */ + options?: (google.cloud.geminidataanalytics.v1beta.IConversationOptions|null); + + /** Context exampleQueries */ + exampleQueries?: (google.cloud.geminidataanalytics.v1beta.IExampleQuery[]|null); + } + + /** Represents a Context. */ + class Context implements IContext { + + /** + * Constructs a new Context. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IContext); + + /** Context systemInstruction. */ + public systemInstruction: string; + + /** Context datasourceReferences. */ + public datasourceReferences?: (google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null); + + /** Context options. */ + public options?: (google.cloud.geminidataanalytics.v1beta.IConversationOptions|null); + + /** Context exampleQueries. */ + public exampleQueries: google.cloud.geminidataanalytics.v1beta.IExampleQuery[]; + + /** + * Creates a new Context instance using the specified properties. + * @param [properties] Properties to set + * @returns Context instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IContext): google.cloud.geminidataanalytics.v1beta.Context; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Context message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.Context; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.Context; + + /** + * Verifies a Context message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Context + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.Context; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @param message Context + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Context to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Context + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExampleQuery. */ + interface IExampleQuery { + + /** ExampleQuery sqlQuery */ + sqlQuery?: (string|null); + + /** ExampleQuery naturalLanguageQuestion */ + naturalLanguageQuestion?: (string|null); + } + + /** Represents an ExampleQuery. */ + class ExampleQuery implements IExampleQuery { + + /** + * Constructs a new ExampleQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IExampleQuery); + + /** ExampleQuery sqlQuery. */ + public sqlQuery?: (string|null); + + /** ExampleQuery naturalLanguageQuestion. */ + public naturalLanguageQuestion: string; + + /** ExampleQuery query. */ + public query?: "sqlQuery"; + + /** + * Creates a new ExampleQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns ExampleQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IExampleQuery): google.cloud.geminidataanalytics.v1beta.ExampleQuery; + + /** + * Encodes the specified ExampleQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExampleQuery.verify|verify} messages. + * @param message ExampleQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IExampleQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExampleQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExampleQuery.verify|verify} messages. + * @param message ExampleQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IExampleQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ExampleQuery; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ExampleQuery; + + /** + * Verifies an ExampleQuery message. + * @param message Plain 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 ExampleQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExampleQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ExampleQuery; + + /** + * Creates a plain object from an ExampleQuery message. Also converts values to other types if specified. + * @param message ExampleQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ExampleQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExampleQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExampleQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationOptions. */ + interface IConversationOptions { + + /** ConversationOptions chart */ + chart?: (google.cloud.geminidataanalytics.v1beta.IChartOptions|null); + + /** ConversationOptions analysis */ + analysis?: (google.cloud.geminidataanalytics.v1beta.IAnalysisOptions|null); + } + + /** Represents a ConversationOptions. */ + class ConversationOptions implements IConversationOptions { + + /** + * Constructs a new ConversationOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IConversationOptions); + + /** ConversationOptions chart. */ + public chart?: (google.cloud.geminidataanalytics.v1beta.IChartOptions|null); + + /** ConversationOptions analysis. */ + public analysis?: (google.cloud.geminidataanalytics.v1beta.IAnalysisOptions|null); + + /** + * Creates a new ConversationOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IConversationOptions): google.cloud.geminidataanalytics.v1beta.ConversationOptions; + + /** + * Encodes the specified ConversationOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationOptions.verify|verify} messages. + * @param message ConversationOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IConversationOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationOptions.verify|verify} messages. + * @param message ConversationOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IConversationOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ConversationOptions; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ConversationOptions; + + /** + * Verifies a ConversationOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ConversationOptions; + + /** + * Creates a plain object from a ConversationOptions message. Also converts values to other types if specified. + * @param message ConversationOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ConversationOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartOptions. */ + interface IChartOptions { + + /** ChartOptions image */ + image?: (google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions|null); + } + + /** Represents a ChartOptions. */ + class ChartOptions implements IChartOptions { + + /** + * Constructs a new ChartOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IChartOptions); + + /** ChartOptions image. */ + public image?: (google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions|null); + + /** + * Creates a new ChartOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IChartOptions): google.cloud.geminidataanalytics.v1beta.ChartOptions; + + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChartOptions; + + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChartOptions; + + /** + * Verifies a ChartOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChartOptions; + + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @param message ChartOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChartOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChartOptions { + + /** Properties of an ImageOptions. */ + interface IImageOptions { + + /** ImageOptions noImage */ + noImage?: (google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage|null); + + /** ImageOptions svg */ + svg?: (google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions|null); + } + + /** Represents an ImageOptions. */ + class ImageOptions implements IImageOptions { + + /** + * Constructs a new ImageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions); + + /** ImageOptions noImage. */ + public noImage?: (google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage|null); + + /** ImageOptions svg. */ + public svg?: (google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions|null); + + /** ImageOptions kind. */ + public kind?: ("noImage"|"svg"); + + /** + * Creates a new ImageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions; + + /** + * Encodes the specified ImageOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.verify|verify} messages. + * @param message ImageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.verify|verify} messages. + * @param message ImageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions; + + /** + * Decodes an ImageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions; + + /** + * Verifies an ImageOptions message. + * @param message Plain 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 ImageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions; + + /** + * Creates a plain object from an ImageOptions message. Also converts values to other types if specified. + * @param message ImageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImageOptions { + + /** Properties of a NoImage. */ + interface INoImage { + } + + /** Represents a NoImage. */ + class NoImage implements INoImage { + + /** + * Constructs a new NoImage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage); + + /** + * Creates a new NoImage instance using the specified properties. + * @param [properties] Properties to set + * @returns NoImage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage; + + /** + * Encodes the specified NoImage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @param message NoImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NoImage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @param message NoImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NoImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage; + + /** + * Decodes a NoImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage; + + /** + * Verifies a NoImage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NoImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NoImage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage; + + /** + * Creates a plain object from a NoImage message. Also converts values to other types if specified. + * @param message NoImage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NoImage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NoImage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SvgOptions. */ + interface ISvgOptions { + } + + /** Represents a SvgOptions. */ + class SvgOptions implements ISvgOptions { + + /** + * Constructs a new SvgOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions); + + /** + * Creates a new SvgOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns SvgOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions; + + /** + * Encodes the specified SvgOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @param message SvgOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SvgOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @param message SvgOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SvgOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions; + + /** + * Decodes a SvgOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions; + + /** + * Verifies a SvgOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SvgOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SvgOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions; + + /** + * Creates a plain object from a SvgOptions message. Also converts values to other types if specified. + * @param message SvgOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SvgOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SvgOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an AnalysisOptions. */ + interface IAnalysisOptions { + + /** AnalysisOptions python */ + python?: (google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython|null); + } + + /** Represents an AnalysisOptions. */ + class AnalysisOptions implements IAnalysisOptions { + + /** + * Constructs a new AnalysisOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisOptions); + + /** AnalysisOptions python. */ + public python?: (google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython|null); + + /** + * Creates a new AnalysisOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisOptions instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisOptions): google.cloud.geminidataanalytics.v1beta.AnalysisOptions; + + /** + * Encodes the specified AnalysisOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.verify|verify} messages. + * @param message AnalysisOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IAnalysisOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.verify|verify} messages. + * @param message AnalysisOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IAnalysisOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.AnalysisOptions; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.AnalysisOptions; + + /** + * Verifies an AnalysisOptions message. + * @param message Plain 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 AnalysisOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.AnalysisOptions; + + /** + * Creates a plain object from an AnalysisOptions message. Also converts values to other types if specified. + * @param message AnalysisOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.AnalysisOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnalysisOptions { + + /** Properties of a Python. */ + interface IPython { + + /** Python enabled */ + enabled?: (boolean|null); + } + + /** Represents a Python. */ + class Python implements IPython { + + /** + * Constructs a new Python. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython); + + /** Python enabled. */ + public enabled: boolean; + + /** + * Creates a new Python instance using the specified properties. + * @param [properties] Properties to set + * @returns Python instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython): google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python; + + /** + * Encodes the specified Python message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.verify|verify} messages. + * @param message Python message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Python message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.verify|verify} messages. + * @param message Python message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Python message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python; + + /** + * Decodes a Python message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python; + + /** + * Verifies a Python message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Python message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Python + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python; + + /** + * Creates a plain object from a Python message. Also converts values to other types if specified. + * @param message Python + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Python to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Python + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** DataFilterType enum. */ + enum DataFilterType { + DATA_FILTER_TYPE_UNSPECIFIED = 0, + ALWAYS_FILTER = 1 + } + + /** Properties of a DatasourceReferences. */ + interface IDatasourceReferences { + + /** DatasourceReferences bq */ + bq?: (google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences|null); + + /** DatasourceReferences studio */ + studio?: (google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences|null); + + /** DatasourceReferences looker */ + looker?: (google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences|null); + } + + /** Represents a DatasourceReferences. */ + class DatasourceReferences implements IDatasourceReferences { + + /** + * Constructs a new DatasourceReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDatasourceReferences); + + /** DatasourceReferences bq. */ + public bq?: (google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences|null); + + /** DatasourceReferences studio. */ + public studio?: (google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences|null); + + /** DatasourceReferences looker. */ + public looker?: (google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences|null); + + /** DatasourceReferences references. */ + public references?: ("bq"|"studio"|"looker"); + + /** + * Creates a new DatasourceReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns DatasourceReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDatasourceReferences): google.cloud.geminidataanalytics.v1beta.DatasourceReferences; + + /** + * Encodes the specified DatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify|verify} messages. + * @param message DatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify|verify} messages. + * @param message DatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DatasourceReferences; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DatasourceReferences; + + /** + * Verifies a DatasourceReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatasourceReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DatasourceReferences; + + /** + * Creates a plain object from a DatasourceReferences message. Also converts values to other types if specified. + * @param message DatasourceReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DatasourceReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatasourceReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatasourceReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryTableReferences. */ + interface IBigQueryTableReferences { + + /** BigQueryTableReferences tableReferences */ + tableReferences?: (google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference[]|null); + } + + /** Represents a BigQueryTableReferences. */ + class BigQueryTableReferences implements IBigQueryTableReferences { + + /** + * Constructs a new BigQueryTableReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences); + + /** BigQueryTableReferences tableReferences. */ + public tableReferences: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference[]; + + /** + * Creates a new BigQueryTableReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryTableReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences): google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences; + + /** + * Encodes the specified BigQueryTableReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.verify|verify} messages. + * @param message BigQueryTableReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryTableReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.verify|verify} messages. + * @param message BigQueryTableReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences; + + /** + * Verifies a BigQueryTableReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryTableReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryTableReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences; + + /** + * Creates a plain object from a BigQueryTableReferences message. Also converts values to other types if specified. + * @param message BigQueryTableReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryTableReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryTableReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryTableReference. */ + interface IBigQueryTableReference { + + /** BigQueryTableReference projectId */ + projectId?: (string|null); + + /** BigQueryTableReference datasetId */ + datasetId?: (string|null); + + /** BigQueryTableReference tableId */ + tableId?: (string|null); + + /** BigQueryTableReference schema */ + schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + } + + /** Represents a BigQueryTableReference. */ + class BigQueryTableReference implements IBigQueryTableReference { + + /** + * Constructs a new BigQueryTableReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference); + + /** BigQueryTableReference projectId. */ + public projectId: string; + + /** BigQueryTableReference datasetId. */ + public datasetId: string; + + /** BigQueryTableReference tableId. */ + public tableId: string; + + /** BigQueryTableReference schema. */ + public schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + + /** + * Creates a new BigQueryTableReference instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryTableReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference): google.cloud.geminidataanalytics.v1beta.BigQueryTableReference; + + /** + * Encodes the specified BigQueryTableReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify|verify} messages. + * @param message BigQueryTableReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryTableReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify|verify} messages. + * @param message BigQueryTableReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.BigQueryTableReference; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.BigQueryTableReference; + + /** + * Verifies a BigQueryTableReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryTableReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryTableReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.BigQueryTableReference; + + /** + * Creates a plain object from a BigQueryTableReference message. Also converts values to other types if specified. + * @param message BigQueryTableReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.BigQueryTableReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryTableReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryTableReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StudioDatasourceReferences. */ + interface IStudioDatasourceReferences { + + /** StudioDatasourceReferences studioReferences */ + studioReferences?: (google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference[]|null); + } + + /** Represents a StudioDatasourceReferences. */ + class StudioDatasourceReferences implements IStudioDatasourceReferences { + + /** + * Constructs a new StudioDatasourceReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences); + + /** StudioDatasourceReferences studioReferences. */ + public studioReferences: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference[]; + + /** + * Creates a new StudioDatasourceReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns StudioDatasourceReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences; + + /** + * Encodes the specified StudioDatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.verify|verify} messages. + * @param message StudioDatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StudioDatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.verify|verify} messages. + * @param message StudioDatasourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences; + + /** + * Verifies a StudioDatasourceReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StudioDatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StudioDatasourceReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences; + + /** + * Creates a plain object from a StudioDatasourceReferences message. Also converts values to other types if specified. + * @param message StudioDatasourceReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StudioDatasourceReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StudioDatasourceReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StudioDatasourceReference. */ + interface IStudioDatasourceReference { + + /** StudioDatasourceReference datasourceId */ + datasourceId?: (string|null); + } + + /** Represents a StudioDatasourceReference. */ + class StudioDatasourceReference implements IStudioDatasourceReference { + + /** + * Constructs a new StudioDatasourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference); + + /** StudioDatasourceReference datasourceId. */ + public datasourceId: string; + + /** + * Creates a new StudioDatasourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns StudioDatasourceReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference; + + /** + * Encodes the specified StudioDatasourceReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.verify|verify} messages. + * @param message StudioDatasourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StudioDatasourceReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.verify|verify} messages. + * @param message StudioDatasourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference; + + /** + * Verifies a StudioDatasourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StudioDatasourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StudioDatasourceReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference; + + /** + * Creates a plain object from a StudioDatasourceReference message. Also converts values to other types if specified. + * @param message StudioDatasourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StudioDatasourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StudioDatasourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookerExploreReferences. */ + interface ILookerExploreReferences { + + /** LookerExploreReferences exploreReferences */ + exploreReferences?: (google.cloud.geminidataanalytics.v1beta.ILookerExploreReference[]|null); + + /** LookerExploreReferences credentials */ + credentials?: (google.cloud.geminidataanalytics.v1beta.ICredentials|null); + } + + /** Represents a LookerExploreReferences. */ + class LookerExploreReferences implements ILookerExploreReferences { + + /** + * Constructs a new LookerExploreReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences); + + /** LookerExploreReferences exploreReferences. */ + public exploreReferences: google.cloud.geminidataanalytics.v1beta.ILookerExploreReference[]; + + /** LookerExploreReferences credentials. */ + public credentials?: (google.cloud.geminidataanalytics.v1beta.ICredentials|null); + + /** + * Creates a new LookerExploreReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerExploreReferences instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences): google.cloud.geminidataanalytics.v1beta.LookerExploreReferences; + + /** + * Encodes the specified LookerExploreReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.verify|verify} messages. + * @param message LookerExploreReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerExploreReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.verify|verify} messages. + * @param message LookerExploreReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.LookerExploreReferences; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.LookerExploreReferences; + + /** + * Verifies a LookerExploreReferences message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerExploreReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerExploreReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.LookerExploreReferences; + + /** + * Creates a plain object from a LookerExploreReferences message. Also converts values to other types if specified. + * @param message LookerExploreReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.LookerExploreReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerExploreReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerExploreReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookerExploreReference. */ + interface ILookerExploreReference { + + /** LookerExploreReference lookerInstanceUri */ + lookerInstanceUri?: (string|null); + + /** LookerExploreReference privateLookerInstanceInfo */ + privateLookerInstanceInfo?: (google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo|null); + + /** LookerExploreReference lookmlModel */ + lookmlModel?: (string|null); + + /** LookerExploreReference explore */ + explore?: (string|null); + + /** LookerExploreReference schema */ + schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + } + + /** Represents a LookerExploreReference. */ + class LookerExploreReference implements ILookerExploreReference { + + /** + * Constructs a new LookerExploreReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ILookerExploreReference); + + /** LookerExploreReference lookerInstanceUri. */ + public lookerInstanceUri?: (string|null); + + /** LookerExploreReference privateLookerInstanceInfo. */ + public privateLookerInstanceInfo?: (google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo|null); + + /** LookerExploreReference lookmlModel. */ + public lookmlModel: string; + + /** LookerExploreReference explore. */ + public explore: string; + + /** LookerExploreReference schema. */ + public schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + + /** LookerExploreReference instance. */ + public instance?: ("lookerInstanceUri"|"privateLookerInstanceInfo"); + + /** + * Creates a new LookerExploreReference instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerExploreReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ILookerExploreReference): google.cloud.geminidataanalytics.v1beta.LookerExploreReference; + + /** + * Encodes the specified LookerExploreReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReference.verify|verify} messages. + * @param message LookerExploreReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ILookerExploreReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerExploreReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReference.verify|verify} messages. + * @param message LookerExploreReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ILookerExploreReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.LookerExploreReference; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.LookerExploreReference; + + /** + * Verifies a LookerExploreReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerExploreReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerExploreReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.LookerExploreReference; + + /** + * Creates a plain object from a LookerExploreReference message. Also converts values to other types if specified. + * @param message LookerExploreReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.LookerExploreReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerExploreReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerExploreReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateLookerInstanceInfo. */ + interface IPrivateLookerInstanceInfo { + + /** PrivateLookerInstanceInfo lookerInstanceId */ + lookerInstanceId?: (string|null); + + /** PrivateLookerInstanceInfo serviceDirectoryName */ + serviceDirectoryName?: (string|null); + } + + /** Represents a PrivateLookerInstanceInfo. */ + class PrivateLookerInstanceInfo implements IPrivateLookerInstanceInfo { + + /** + * Constructs a new PrivateLookerInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo); + + /** PrivateLookerInstanceInfo lookerInstanceId. */ + public lookerInstanceId: string; + + /** PrivateLookerInstanceInfo serviceDirectoryName. */ + public serviceDirectoryName: string; + + /** + * Creates a new PrivateLookerInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateLookerInstanceInfo instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo): google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo; + + /** + * Encodes the specified PrivateLookerInstanceInfo message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.verify|verify} messages. + * @param message PrivateLookerInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateLookerInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.verify|verify} messages. + * @param message PrivateLookerInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo; + + /** + * Verifies a PrivateLookerInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateLookerInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateLookerInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo; + + /** + * Creates a plain object from a PrivateLookerInstanceInfo message. Also converts values to other types if specified. + * @param message PrivateLookerInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateLookerInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateLookerInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Datasource. */ + interface IDatasource { + + /** Datasource bigqueryTableReference */ + bigqueryTableReference?: (google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null); + + /** Datasource studioDatasourceId */ + studioDatasourceId?: (string|null); + + /** Datasource lookerExploreReference */ + lookerExploreReference?: (google.cloud.geminidataanalytics.v1beta.ILookerExploreReference|null); + + /** Datasource schema */ + schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + } + + /** Represents a Datasource. */ + class Datasource implements IDatasource { + + /** + * Constructs a new Datasource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDatasource); + + /** Datasource bigqueryTableReference. */ + public bigqueryTableReference?: (google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null); + + /** Datasource studioDatasourceId. */ + public studioDatasourceId?: (string|null); + + /** Datasource lookerExploreReference. */ + public lookerExploreReference?: (google.cloud.geminidataanalytics.v1beta.ILookerExploreReference|null); + + /** Datasource schema. */ + public schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + + /** Datasource reference. */ + public reference?: ("bigqueryTableReference"|"studioDatasourceId"|"lookerExploreReference"); + + /** + * Creates a new Datasource instance using the specified properties. + * @param [properties] Properties to set + * @returns Datasource instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDatasource): google.cloud.geminidataanalytics.v1beta.Datasource; + + /** + * Encodes the specified Datasource message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Datasource.verify|verify} messages. + * @param message Datasource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDatasource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Datasource message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Datasource.verify|verify} messages. + * @param message Datasource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDatasource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Datasource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.Datasource; + + /** + * Decodes a Datasource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.Datasource; + + /** + * Verifies a Datasource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Datasource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Datasource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.Datasource; + + /** + * Creates a plain object from a Datasource message. Also converts values to other types if specified. + * @param message Datasource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.Datasource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Datasource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Datasource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema fields */ + fields?: (google.cloud.geminidataanalytics.v1beta.IField[]|null); + + /** Schema description */ + description?: (string|null); + + /** Schema synonyms */ + synonyms?: (string[]|null); + + /** Schema tags */ + tags?: (string[]|null); + + /** Schema displayName */ + displayName?: (string|null); + + /** Schema filters */ + filters?: (google.cloud.geminidataanalytics.v1beta.IDataFilter[]|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ISchema); + + /** Schema fields. */ + public fields: google.cloud.geminidataanalytics.v1beta.IField[]; + + /** Schema description. */ + public description: string; + + /** Schema synonyms. */ + public synonyms: string[]; + + /** Schema tags. */ + public tags: string[]; + + /** Schema displayName. */ + public displayName: string; + + /** Schema filters. */ + public filters: google.cloud.geminidataanalytics.v1beta.IDataFilter[]; + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ISchema): google.cloud.geminidataanalytics.v1beta.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Field. */ + interface IField { + + /** Field name */ + name?: (string|null); + + /** Field type */ + type?: (string|null); + + /** Field description */ + description?: (string|null); + + /** Field mode */ + mode?: (string|null); + + /** Field synonyms */ + synonyms?: (string[]|null); + + /** Field tags */ + tags?: (string[]|null); + + /** Field displayName */ + displayName?: (string|null); + + /** Field subfields */ + subfields?: (google.cloud.geminidataanalytics.v1beta.IField[]|null); + + /** Field category */ + category?: (string|null); + + /** Field valueFormat */ + valueFormat?: (string|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IField); + + /** Field name. */ + public name: string; + + /** Field type. */ + public type: string; + + /** Field description. */ + public description: string; + + /** Field mode. */ + public mode: string; + + /** Field synonyms. */ + public synonyms: string[]; + + /** Field tags. */ + public tags: string[]; + + /** Field displayName. */ + public displayName: string; + + /** Field subfields. */ + public subfields: google.cloud.geminidataanalytics.v1beta.IField[]; + + /** Field category. */ + public category: string; + + /** Field valueFormat. */ + public valueFormat: string; + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IField): google.cloud.geminidataanalytics.v1beta.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.Field; + + /** + * Verifies a Field message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataFilter. */ + interface IDataFilter { + + /** DataFilter field */ + field?: (string|null); + + /** DataFilter value */ + value?: (string|null); + + /** DataFilter type */ + type?: (google.cloud.geminidataanalytics.v1beta.DataFilterType|keyof typeof google.cloud.geminidataanalytics.v1beta.DataFilterType|null); + } + + /** Represents a DataFilter. */ + class DataFilter implements IDataFilter { + + /** + * Constructs a new DataFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDataFilter); + + /** DataFilter field. */ + public field: string; + + /** DataFilter value. */ + public value: string; + + /** DataFilter type. */ + public type: (google.cloud.geminidataanalytics.v1beta.DataFilterType|keyof typeof google.cloud.geminidataanalytics.v1beta.DataFilterType); + + /** + * Creates a new DataFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DataFilter instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDataFilter): google.cloud.geminidataanalytics.v1beta.DataFilter; + + /** + * Encodes the specified DataFilter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataFilter.verify|verify} messages. + * @param message DataFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDataFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataFilter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataFilter.verify|verify} messages. + * @param message DataFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDataFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DataFilter; + + /** + * Decodes a DataFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DataFilter; + + /** + * Verifies a DataFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DataFilter; + + /** + * Creates a plain object from a DataFilter message. Also converts values to other types if specified. + * @param message DataFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DataFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Credentials. */ + interface ICredentials { + + /** Credentials oauth */ + oauth?: (google.cloud.geminidataanalytics.v1beta.IOAuthCredentials|null); + } + + /** Represents a Credentials. */ + class Credentials implements ICredentials { + + /** + * Constructs a new Credentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ICredentials); + + /** Credentials oauth. */ + public oauth?: (google.cloud.geminidataanalytics.v1beta.IOAuthCredentials|null); + + /** Credentials kind. */ + public kind?: "oauth"; + + /** + * Creates a new Credentials instance using the specified properties. + * @param [properties] Properties to set + * @returns Credentials instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ICredentials): google.cloud.geminidataanalytics.v1beta.Credentials; + + /** + * Encodes the specified Credentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Credentials.verify|verify} messages. + * @param message Credentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ICredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Credentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Credentials.verify|verify} messages. + * @param message Credentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ICredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Credentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.Credentials; + + /** + * Decodes a Credentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.Credentials; + + /** + * Verifies a Credentials message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Credentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Credentials + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.Credentials; + + /** + * Creates a plain object from a Credentials message. Also converts values to other types if specified. + * @param message Credentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.Credentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Credentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Credentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a OAuthCredentials. */ + interface IOAuthCredentials { + + /** OAuthCredentials secret */ + secret?: (google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased|null); + + /** OAuthCredentials token */ + token?: (google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased|null); + } + + /** Represents a OAuthCredentials. */ + class OAuthCredentials implements IOAuthCredentials { + + /** + * Constructs a new OAuthCredentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IOAuthCredentials); + + /** OAuthCredentials secret. */ + public secret?: (google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased|null); + + /** OAuthCredentials token. */ + public token?: (google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased|null); + + /** OAuthCredentials kind. */ + public kind?: ("secret"|"token"); + + /** + * Creates a new OAuthCredentials instance using the specified properties. + * @param [properties] Properties to set + * @returns OAuthCredentials instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IOAuthCredentials): google.cloud.geminidataanalytics.v1beta.OAuthCredentials; + + /** + * Encodes the specified OAuthCredentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.verify|verify} messages. + * @param message OAuthCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IOAuthCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OAuthCredentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.verify|verify} messages. + * @param message OAuthCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IOAuthCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.OAuthCredentials; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.OAuthCredentials; + + /** + * Verifies a OAuthCredentials message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a OAuthCredentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OAuthCredentials + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.OAuthCredentials; + + /** + * Creates a plain object from a OAuthCredentials message. Also converts values to other types if specified. + * @param message OAuthCredentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.OAuthCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OAuthCredentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OAuthCredentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OAuthCredentials { + + /** Properties of a SecretBased. */ + interface ISecretBased { + + /** SecretBased clientId */ + clientId?: (string|null); + + /** SecretBased clientSecret */ + clientSecret?: (string|null); + } + + /** Represents a SecretBased. */ + class SecretBased implements ISecretBased { + + /** + * Constructs a new SecretBased. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased); + + /** SecretBased clientId. */ + public clientId: string; + + /** SecretBased clientSecret. */ + public clientSecret: string; + + /** + * Creates a new SecretBased instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretBased instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased; + + /** + * Encodes the specified SecretBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.verify|verify} messages. + * @param message SecretBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.verify|verify} messages. + * @param message SecretBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretBased message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased; + + /** + * Decodes a SecretBased message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased; + + /** + * Verifies a SecretBased message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretBased message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretBased + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased; + + /** + * Creates a plain object from a SecretBased message. Also converts values to other types if specified. + * @param message SecretBased + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretBased to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretBased + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TokenBased. */ + interface ITokenBased { + + /** TokenBased accessToken */ + accessToken?: (string|null); + } + + /** Represents a TokenBased. */ + class TokenBased implements ITokenBased { + + /** + * Constructs a new TokenBased. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased); + + /** TokenBased accessToken. */ + public accessToken: string; + + /** + * Creates a new TokenBased instance using the specified properties. + * @param [properties] Properties to set + * @returns TokenBased instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased; + + /** + * Encodes the specified TokenBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.verify|verify} messages. + * @param message TokenBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TokenBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.verify|verify} messages. + * @param message TokenBased message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TokenBased message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased; + + /** + * Decodes a TokenBased message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased; + + /** + * Verifies a TokenBased message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TokenBased message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TokenBased + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased; + + /** + * Creates a plain object from a TokenBased message. Also converts values to other types if specified. + * @param message TokenBased + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TokenBased to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TokenBased + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Conversation. */ + interface IConversation { + + /** Conversation name */ + name?: (string|null); + + /** Conversation agents */ + agents?: (string[]|null); + + /** Conversation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation lastUsedTime */ + lastUsedTime?: (google.protobuf.ITimestamp|null); + + /** Conversation labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IConversation); + + /** Conversation name. */ + public name: string; + + /** Conversation agents. */ + public agents: string[]; + + /** Conversation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation lastUsedTime. */ + public lastUsedTime?: (google.protobuf.ITimestamp|null); + + /** Conversation labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Conversation instance using the specified properties. + * @param [properties] Properties to set + * @returns Conversation instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IConversation): google.cloud.geminidataanalytics.v1beta.Conversation; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.Conversation; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.Conversation; + + /** + * Verifies a Conversation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Conversation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.Conversation; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @param message Conversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Conversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Conversation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConversationRequest. */ + interface ICreateConversationRequest { + + /** CreateConversationRequest parent */ + parent?: (string|null); + + /** CreateConversationRequest conversationId */ + conversationId?: (string|null); + + /** CreateConversationRequest conversation */ + conversation?: (google.cloud.geminidataanalytics.v1beta.IConversation|null); + + /** CreateConversationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateConversationRequest. */ + class CreateConversationRequest implements ICreateConversationRequest { + + /** + * Constructs a new CreateConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest); + + /** CreateConversationRequest parent. */ + public parent: string; + + /** CreateConversationRequest conversationId. */ + public conversationId: string; + + /** CreateConversationRequest conversation. */ + public conversation?: (google.cloud.geminidataanalytics.v1beta.IConversation|null); + + /** CreateConversationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConversationRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest): google.cloud.geminidataanalytics.v1beta.CreateConversationRequest; + + /** + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.CreateConversationRequest; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.CreateConversationRequest; + + /** + * Verifies a CreateConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.CreateConversationRequest; + + /** + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * @param message CreateConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.CreateConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConversationRequest. */ + interface IGetConversationRequest { + + /** GetConversationRequest name */ + name?: (string|null); + } + + /** Represents a GetConversationRequest. */ + class GetConversationRequest implements IGetConversationRequest { + + /** + * Constructs a new GetConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IGetConversationRequest); + + /** GetConversationRequest name. */ + public name: string; + + /** + * Creates a new GetConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConversationRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IGetConversationRequest): google.cloud.geminidataanalytics.v1beta.GetConversationRequest; + + /** + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.GetConversationRequest; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.GetConversationRequest; + + /** + * Verifies a GetConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.GetConversationRequest; + + /** + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. + * @param message GetConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.GetConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationsRequest. */ + interface IListConversationsRequest { + + /** ListConversationsRequest parent */ + parent?: (string|null); + + /** ListConversationsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversationsRequest pageToken */ + pageToken?: (string|null); + + /** ListConversationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListConversationsRequest. */ + class ListConversationsRequest implements IListConversationsRequest { + + /** + * Constructs a new ListConversationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListConversationsRequest); + + /** ListConversationsRequest parent. */ + public parent: string; + + /** ListConversationsRequest pageSize. */ + public pageSize: number; + + /** ListConversationsRequest pageToken. */ + public pageToken: string; + + /** ListConversationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListConversationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationsRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListConversationsRequest): google.cloud.geminidataanalytics.v1beta.ListConversationsRequest; + + /** + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListConversationsRequest; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListConversationsRequest; + + /** + * Verifies a ListConversationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListConversationsRequest; + + /** + * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. + * @param message ListConversationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListConversationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationsResponse. */ + interface IListConversationsResponse { + + /** ListConversationsResponse conversations */ + conversations?: (google.cloud.geminidataanalytics.v1beta.IConversation[]|null); + + /** ListConversationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConversationsResponse. */ + class ListConversationsResponse implements IListConversationsResponse { + + /** + * Constructs a new ListConversationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListConversationsResponse); + + /** ListConversationsResponse conversations. */ + public conversations: google.cloud.geminidataanalytics.v1beta.IConversation[]; + + /** ListConversationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConversationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationsResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListConversationsResponse): google.cloud.geminidataanalytics.v1beta.ListConversationsResponse; + + /** + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListConversationsResponse; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListConversationsResponse; + + /** + * Verifies a ListConversationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListConversationsResponse; + + /** + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * @param message ListConversationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListConversationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAgent. */ + interface IDataAgent { + + /** DataAgent dataAnalyticsAgent */ + dataAnalyticsAgent?: (google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent|null); + + /** DataAgent name */ + name?: (string|null); + + /** DataAgent displayName */ + displayName?: (string|null); + + /** DataAgent description */ + description?: (string|null); + + /** DataAgent labels */ + labels?: ({ [k: string]: string }|null); + + /** DataAgent createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent purgeTime */ + purgeTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataAgent. */ + class DataAgent implements IDataAgent { + + /** + * Constructs a new DataAgent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDataAgent); + + /** DataAgent dataAnalyticsAgent. */ + public dataAnalyticsAgent?: (google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent|null); + + /** DataAgent name. */ + public name: string; + + /** DataAgent displayName. */ + public displayName: string; + + /** DataAgent description. */ + public description: string; + + /** DataAgent labels. */ + public labels: { [k: string]: string }; + + /** DataAgent createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent purgeTime. */ + public purgeTime?: (google.protobuf.ITimestamp|null); + + /** DataAgent type. */ + public type?: "dataAnalyticsAgent"; + + /** + * Creates a new DataAgent instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAgent instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDataAgent): google.cloud.geminidataanalytics.v1beta.DataAgent; + + /** + * Encodes the specified DataAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgent.verify|verify} messages. + * @param message DataAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDataAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgent.verify|verify} messages. + * @param message DataAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDataAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAgent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DataAgent; + + /** + * Decodes a DataAgent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DataAgent; + + /** + * Verifies a DataAgent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAgent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAgent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DataAgent; + + /** + * Creates a plain object from a DataAgent message. Also converts values to other types if specified. + * @param message DataAgent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DataAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAgent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAgent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAnalyticsAgent. */ + interface IDataAnalyticsAgent { + + /** DataAnalyticsAgent stagingContext */ + stagingContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + + /** DataAnalyticsAgent publishedContext */ + publishedContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + + /** DataAnalyticsAgent lastPublishedContext */ + lastPublishedContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + } + + /** Represents a DataAnalyticsAgent. */ + class DataAnalyticsAgent implements IDataAnalyticsAgent { + + /** + * Constructs a new DataAnalyticsAgent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent); + + /** DataAnalyticsAgent stagingContext. */ + public stagingContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + + /** DataAnalyticsAgent publishedContext. */ + public publishedContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + + /** DataAnalyticsAgent lastPublishedContext. */ + public lastPublishedContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + + /** + * Creates a new DataAnalyticsAgent instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAnalyticsAgent instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent): google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent; + + /** + * Encodes the specified DataAnalyticsAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.verify|verify} messages. + * @param message DataAnalyticsAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAnalyticsAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.verify|verify} messages. + * @param message DataAnalyticsAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent; + + /** + * Verifies a DataAnalyticsAgent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAnalyticsAgent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAnalyticsAgent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent; + + /** + * Creates a plain object from a DataAnalyticsAgent message. Also converts values to other types if specified. + * @param message DataAnalyticsAgent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAnalyticsAgent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAnalyticsAgent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a DataAgentService */ + class DataAgentService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataAgentService 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 DataAgentService 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): DataAgentService; + + /** + * Calls ListDataAgents. + * @param request ListDataAgentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataAgentsResponse + */ + public listDataAgents(request: google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.ListDataAgentsCallback): void; + + /** + * Calls ListDataAgents. + * @param request ListDataAgentsRequest message or plain object + * @returns Promise + */ + public listDataAgents(request: google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest): Promise; + + /** + * Calls ListAccessibleDataAgents. + * @param request ListAccessibleDataAgentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAccessibleDataAgentsResponse + */ + public listAccessibleDataAgents(request: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.ListAccessibleDataAgentsCallback): void; + + /** + * Calls ListAccessibleDataAgents. + * @param request ListAccessibleDataAgentsRequest message or plain object + * @returns Promise + */ + public listAccessibleDataAgents(request: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest): Promise; + + /** + * Calls GetDataAgent. + * @param request GetDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataAgent + */ + public getDataAgent(request: google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.GetDataAgentCallback): void; + + /** + * Calls GetDataAgent. + * @param request GetDataAgentRequest message or plain object + * @returns Promise + */ + public getDataAgent(request: google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest): Promise; + + /** + * Calls CreateDataAgent. + * @param request CreateDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDataAgent(request: google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.CreateDataAgentCallback): void; + + /** + * Calls CreateDataAgent. + * @param request CreateDataAgentRequest message or plain object + * @returns Promise + */ + public createDataAgent(request: google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest): Promise; + + /** + * Calls UpdateDataAgent. + * @param request UpdateDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataAgent(request: google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.UpdateDataAgentCallback): void; + + /** + * Calls UpdateDataAgent. + * @param request UpdateDataAgentRequest message or plain object + * @returns Promise + */ + public updateDataAgent(request: google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest): Promise; + + /** + * Calls DeleteDataAgent. + * @param request DeleteDataAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataAgent(request: google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.DeleteDataAgentCallback): void; + + /** + * Calls DeleteDataAgent. + * @param request DeleteDataAgentRequest message or plain object + * @returns Promise + */ + public deleteDataAgent(request: google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.geminidataanalytics.v1beta.DataAgentService.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + } + + namespace DataAgentService { + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|listDataAgents}. + * @param error Error, if any + * @param [response] ListDataAgentsResponse + */ + type ListDataAgentsCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|listAccessibleDataAgents}. + * @param error Error, if any + * @param [response] ListAccessibleDataAgentsResponse + */ + type ListAccessibleDataAgentsCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|getDataAgent}. + * @param error Error, if any + * @param [response] DataAgent + */ + type GetDataAgentCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.DataAgent) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|createDataAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDataAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|updateDataAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|deleteDataAgent}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDataAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + } + + /** Properties of a ListDataAgentsRequest. */ + interface IListDataAgentsRequest { + + /** ListDataAgentsRequest parent */ + parent?: (string|null); + + /** ListDataAgentsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataAgentsRequest pageToken */ + pageToken?: (string|null); + + /** ListDataAgentsRequest filter */ + filter?: (string|null); + + /** ListDataAgentsRequest orderBy */ + orderBy?: (string|null); + + /** ListDataAgentsRequest showDeleted */ + showDeleted?: (boolean|null); + } + + /** Represents a ListDataAgentsRequest. */ + class ListDataAgentsRequest implements IListDataAgentsRequest { + + /** + * Constructs a new ListDataAgentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest); + + /** ListDataAgentsRequest parent. */ + public parent: string; + + /** ListDataAgentsRequest pageSize. */ + public pageSize: number; + + /** ListDataAgentsRequest pageToken. */ + public pageToken: string; + + /** ListDataAgentsRequest filter. */ + public filter: string; + + /** ListDataAgentsRequest orderBy. */ + public orderBy: string; + + /** ListDataAgentsRequest showDeleted. */ + public showDeleted: boolean; + + /** + * Creates a new ListDataAgentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAgentsRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest): google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest; + + /** + * Encodes the specified ListDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest.verify|verify} messages. + * @param message ListDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest.verify|verify} messages. + * @param message ListDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest; + + /** + * Verifies a ListDataAgentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAgentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest; + + /** + * Creates a plain object from a ListDataAgentsRequest message. Also converts values to other types if specified. + * @param message ListDataAgentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAgentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAgentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataAgentsResponse. */ + interface IListDataAgentsResponse { + + /** ListDataAgentsResponse dataAgents */ + dataAgents?: (google.cloud.geminidataanalytics.v1beta.IDataAgent[]|null); + + /** ListDataAgentsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataAgentsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataAgentsResponse. */ + class ListDataAgentsResponse implements IListDataAgentsResponse { + + /** + * Constructs a new ListDataAgentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse); + + /** ListDataAgentsResponse dataAgents. */ + public dataAgents: google.cloud.geminidataanalytics.v1beta.IDataAgent[]; + + /** ListDataAgentsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataAgentsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataAgentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAgentsResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse): google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse; + + /** + * Encodes the specified ListDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse.verify|verify} messages. + * @param message ListDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse.verify|verify} messages. + * @param message ListDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse; + + /** + * Verifies a ListDataAgentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAgentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse; + + /** + * Creates a plain object from a ListDataAgentsResponse message. Also converts values to other types if specified. + * @param message ListDataAgentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAgentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAgentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccessibleDataAgentsRequest. */ + interface IListAccessibleDataAgentsRequest { + + /** ListAccessibleDataAgentsRequest parent */ + parent?: (string|null); + + /** ListAccessibleDataAgentsRequest pageSize */ + pageSize?: (number|null); + + /** ListAccessibleDataAgentsRequest pageToken */ + pageToken?: (string|null); + + /** ListAccessibleDataAgentsRequest filter */ + filter?: (string|null); + + /** ListAccessibleDataAgentsRequest orderBy */ + orderBy?: (string|null); + + /** ListAccessibleDataAgentsRequest showDeleted */ + showDeleted?: (boolean|null); + + /** ListAccessibleDataAgentsRequest creatorFilter */ + creatorFilter?: (google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter|keyof typeof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter|null); + } + + /** Represents a ListAccessibleDataAgentsRequest. */ + class ListAccessibleDataAgentsRequest implements IListAccessibleDataAgentsRequest { + + /** + * Constructs a new ListAccessibleDataAgentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest); + + /** ListAccessibleDataAgentsRequest parent. */ + public parent: string; + + /** ListAccessibleDataAgentsRequest pageSize. */ + public pageSize: number; + + /** ListAccessibleDataAgentsRequest pageToken. */ + public pageToken: string; + + /** ListAccessibleDataAgentsRequest filter. */ + public filter: string; + + /** ListAccessibleDataAgentsRequest orderBy. */ + public orderBy: string; + + /** ListAccessibleDataAgentsRequest showDeleted. */ + public showDeleted: boolean; + + /** ListAccessibleDataAgentsRequest creatorFilter. */ + public creatorFilter: (google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter|keyof typeof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter); + + /** + * Creates a new ListAccessibleDataAgentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccessibleDataAgentsRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @param message ListAccessibleDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @param message ListAccessibleDataAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest; + + /** + * Verifies a ListAccessibleDataAgentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccessibleDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccessibleDataAgentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest; + + /** + * Creates a plain object from a ListAccessibleDataAgentsRequest message. Also converts values to other types if specified. + * @param message ListAccessibleDataAgentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccessibleDataAgentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccessibleDataAgentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ListAccessibleDataAgentsRequest { + + /** CreatorFilter enum. */ + enum CreatorFilter { + CREATOR_FILTER_UNSPECIFIED = 0, + NONE = 1, + CREATOR_ONLY = 2, + NOT_CREATOR_ONLY = 3 + } + } + + /** Properties of a ListAccessibleDataAgentsResponse. */ + interface IListAccessibleDataAgentsResponse { + + /** ListAccessibleDataAgentsResponse dataAgents */ + dataAgents?: (google.cloud.geminidataanalytics.v1beta.IDataAgent[]|null); + + /** ListAccessibleDataAgentsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAccessibleDataAgentsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAccessibleDataAgentsResponse. */ + class ListAccessibleDataAgentsResponse implements IListAccessibleDataAgentsResponse { + + /** + * Constructs a new ListAccessibleDataAgentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse); + + /** ListAccessibleDataAgentsResponse dataAgents. */ + public dataAgents: google.cloud.geminidataanalytics.v1beta.IDataAgent[]; + + /** ListAccessibleDataAgentsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAccessibleDataAgentsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAccessibleDataAgentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccessibleDataAgentsResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @param message ListAccessibleDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @param message ListAccessibleDataAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse; + + /** + * Verifies a ListAccessibleDataAgentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccessibleDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccessibleDataAgentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse; + + /** + * Creates a plain object from a ListAccessibleDataAgentsResponse message. Also converts values to other types if specified. + * @param message ListAccessibleDataAgentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccessibleDataAgentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccessibleDataAgentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataAgentRequest. */ + interface IGetDataAgentRequest { + + /** GetDataAgentRequest name */ + name?: (string|null); + } + + /** Represents a GetDataAgentRequest. */ + class GetDataAgentRequest implements IGetDataAgentRequest { + + /** + * Constructs a new GetDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest); + + /** GetDataAgentRequest name. */ + public name: string; + + /** + * Creates a new GetDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest): google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest; + + /** + * Encodes the specified GetDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest.verify|verify} messages. + * @param message GetDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest.verify|verify} messages. + * @param message GetDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest; + + /** + * Verifies a GetDataAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest; + + /** + * Creates a plain object from a GetDataAgentRequest message. Also converts values to other types if specified. + * @param message GetDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDataAgentRequest. */ + interface ICreateDataAgentRequest { + + /** CreateDataAgentRequest parent */ + parent?: (string|null); + + /** CreateDataAgentRequest dataAgentId */ + dataAgentId?: (string|null); + + /** CreateDataAgentRequest dataAgent */ + dataAgent?: (google.cloud.geminidataanalytics.v1beta.IDataAgent|null); + + /** CreateDataAgentRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateDataAgentRequest. */ + class CreateDataAgentRequest implements ICreateDataAgentRequest { + + /** + * Constructs a new CreateDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest); + + /** CreateDataAgentRequest parent. */ + public parent: string; + + /** CreateDataAgentRequest dataAgentId. */ + public dataAgentId: string; + + /** CreateDataAgentRequest dataAgent. */ + public dataAgent?: (google.cloud.geminidataanalytics.v1beta.IDataAgent|null); + + /** CreateDataAgentRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest): google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest; + + /** + * Encodes the specified CreateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest.verify|verify} messages. + * @param message CreateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest.verify|verify} messages. + * @param message CreateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest; + + /** + * Verifies a CreateDataAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest; + + /** + * Creates a plain object from a CreateDataAgentRequest message. Also converts values to other types if specified. + * @param message CreateDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataAgentRequest. */ + interface IUpdateDataAgentRequest { + + /** UpdateDataAgentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAgentRequest dataAgent */ + dataAgent?: (google.cloud.geminidataanalytics.v1beta.IDataAgent|null); + + /** UpdateDataAgentRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateDataAgentRequest. */ + class UpdateDataAgentRequest implements IUpdateDataAgentRequest { + + /** + * Constructs a new UpdateDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest); + + /** UpdateDataAgentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAgentRequest dataAgent. */ + public dataAgent?: (google.cloud.geminidataanalytics.v1beta.IDataAgent|null); + + /** UpdateDataAgentRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest): google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest; + + /** + * Encodes the specified UpdateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest.verify|verify} messages. + * @param message UpdateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest.verify|verify} messages. + * @param message UpdateDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest; + + /** + * Verifies an UpdateDataAgentRequest message. + * @param message Plain 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 UpdateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest; + + /** + * Creates a plain object from an UpdateDataAgentRequest message. Also converts values to other types if specified. + * @param message UpdateDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataAgentRequest. */ + interface IDeleteDataAgentRequest { + + /** DeleteDataAgentRequest name */ + name?: (string|null); + + /** DeleteDataAgentRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteDataAgentRequest. */ + class DeleteDataAgentRequest implements IDeleteDataAgentRequest { + + /** + * Constructs a new DeleteDataAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest); + + /** DeleteDataAgentRequest name. */ + public name: string; + + /** DeleteDataAgentRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteDataAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataAgentRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest): google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest; + + /** + * Encodes the specified DeleteDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest.verify|verify} messages. + * @param message DeleteDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest.verify|verify} messages. + * @param message DeleteDataAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest; + + /** + * Verifies a DeleteDataAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataAgentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest; + + /** + * Creates a plain object from a DeleteDataAgentRequest message. Also converts values to other types if specified. + * @param message DeleteDataAgentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataAgentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataAgentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.IOperationMetadata): google.cloud.geminidataanalytics.v1beta.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a DataChatService */ + class DataChatService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataChatService 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 DataChatService 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): DataChatService; + + /** + * Calls Chat. + * @param request ChatRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Message + */ + public chat(request: google.cloud.geminidataanalytics.v1beta.IChatRequest, callback: google.cloud.geminidataanalytics.v1beta.DataChatService.ChatCallback): void; + + /** + * Calls Chat. + * @param request ChatRequest message or plain object + * @returns Promise + */ + public chat(request: google.cloud.geminidataanalytics.v1beta.IChatRequest): Promise; + + /** + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation + */ + public createConversation(request: google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest, callback: google.cloud.geminidataanalytics.v1beta.DataChatService.CreateConversationCallback): void; + + /** + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @returns Promise + */ + public createConversation(request: google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest): Promise; + + /** + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation + */ + public getConversation(request: google.cloud.geminidataanalytics.v1beta.IGetConversationRequest, callback: google.cloud.geminidataanalytics.v1beta.DataChatService.GetConversationCallback): void; + + /** + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @returns Promise + */ + public getConversation(request: google.cloud.geminidataanalytics.v1beta.IGetConversationRequest): Promise; + + /** + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationsResponse + */ + public listConversations(request: google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, callback: google.cloud.geminidataanalytics.v1beta.DataChatService.ListConversationsCallback): void; + + /** + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @returns Promise + */ + public listConversations(request: google.cloud.geminidataanalytics.v1beta.IListConversationsRequest): Promise; + + /** + * Calls ListMessages. + * @param request ListMessagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMessagesResponse + */ + public listMessages(request: google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, callback: google.cloud.geminidataanalytics.v1beta.DataChatService.ListMessagesCallback): void; + + /** + * Calls ListMessages. + * @param request ListMessagesRequest message or plain object + * @returns Promise + */ + public listMessages(request: google.cloud.geminidataanalytics.v1beta.IListMessagesRequest): Promise; + } + + namespace DataChatService { + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|chat}. + * @param error Error, if any + * @param [response] Message + */ + type ChatCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.Message) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|createConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type CreateConversationCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|getConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type GetConversationCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|listConversations}. + * @param error Error, if any + * @param [response] ListConversationsResponse + */ + type ListConversationsCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.ListConversationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|listMessages}. + * @param error Error, if any + * @param [response] ListMessagesResponse + */ + type ListMessagesCallback = (error: (Error|null), response?: google.cloud.geminidataanalytics.v1beta.ListMessagesResponse) => void; + } + + /** Properties of a ListMessagesRequest. */ + interface IListMessagesRequest { + + /** ListMessagesRequest parent */ + parent?: (string|null); + + /** ListMessagesRequest pageSize */ + pageSize?: (number|null); + + /** ListMessagesRequest pageToken */ + pageToken?: (string|null); + + /** ListMessagesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListMessagesRequest. */ + class ListMessagesRequest implements IListMessagesRequest { + + /** + * Constructs a new ListMessagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListMessagesRequest); + + /** ListMessagesRequest parent. */ + public parent: string; + + /** ListMessagesRequest pageSize. */ + public pageSize: number; + + /** ListMessagesRequest pageToken. */ + public pageToken: string; + + /** ListMessagesRequest filter. */ + public filter: string; + + /** + * Creates a new ListMessagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessagesRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListMessagesRequest): google.cloud.geminidataanalytics.v1beta.ListMessagesRequest; + + /** + * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * @param message ListMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * @param message ListMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListMessagesRequest; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListMessagesRequest; + + /** + * Verifies a ListMessagesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListMessagesRequest; + + /** + * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. + * @param message ListMessagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListMessagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessagesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMessagesResponse. */ + interface IListMessagesResponse { + + /** ListMessagesResponse messages */ + messages?: (google.cloud.geminidataanalytics.v1beta.IStorageMessage[]|null); + + /** ListMessagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMessagesResponse. */ + class ListMessagesResponse implements IListMessagesResponse { + + /** + * Constructs a new ListMessagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IListMessagesResponse); + + /** ListMessagesResponse messages. */ + public messages: google.cloud.geminidataanalytics.v1beta.IStorageMessage[]; + + /** ListMessagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMessagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessagesResponse instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IListMessagesResponse): google.cloud.geminidataanalytics.v1beta.ListMessagesResponse; + + /** + * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * @param message ListMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * @param message ListMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ListMessagesResponse; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ListMessagesResponse; + + /** + * Verifies a ListMessagesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ListMessagesResponse; + + /** + * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * @param message ListMessagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ListMessagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StorageMessage. */ + interface IStorageMessage { + + /** StorageMessage messageId */ + messageId?: (string|null); + + /** StorageMessage message */ + message?: (google.cloud.geminidataanalytics.v1beta.IMessage|null); + } + + /** Represents a StorageMessage. */ + class StorageMessage implements IStorageMessage { + + /** + * Constructs a new StorageMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IStorageMessage); + + /** StorageMessage messageId. */ + public messageId: string; + + /** StorageMessage message. */ + public message?: (google.cloud.geminidataanalytics.v1beta.IMessage|null); + + /** + * Creates a new StorageMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IStorageMessage): google.cloud.geminidataanalytics.v1beta.StorageMessage; + + /** + * Encodes the specified StorageMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. + * @param message StorageMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IStorageMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. + * @param message StorageMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IStorageMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.StorageMessage; + + /** + * Decodes a StorageMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.StorageMessage; + + /** + * Verifies a StorageMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.StorageMessage; + + /** + * Creates a plain object from a StorageMessage message. Also converts values to other types if specified. + * @param message StorageMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.StorageMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChatRequest. */ + interface IChatRequest { + + /** ChatRequest inlineContext */ + inlineContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + + /** ChatRequest conversationReference */ + conversationReference?: (google.cloud.geminidataanalytics.v1beta.IConversationReference|null); + + /** ChatRequest dataAgentContext */ + dataAgentContext?: (google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null); + + /** ChatRequest project */ + project?: (string|null); + + /** ChatRequest parent */ + parent?: (string|null); + + /** ChatRequest messages */ + messages?: (google.cloud.geminidataanalytics.v1beta.IMessage[]|null); + } + + /** Represents a ChatRequest. */ + class ChatRequest implements IChatRequest { + + /** + * Constructs a new ChatRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IChatRequest); + + /** ChatRequest inlineContext. */ + public inlineContext?: (google.cloud.geminidataanalytics.v1beta.IContext|null); + + /** ChatRequest conversationReference. */ + public conversationReference?: (google.cloud.geminidataanalytics.v1beta.IConversationReference|null); + + /** ChatRequest dataAgentContext. */ + public dataAgentContext?: (google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null); + + /** ChatRequest project. */ + public project: string; + + /** ChatRequest parent. */ + public parent: string; + + /** ChatRequest messages. */ + public messages: google.cloud.geminidataanalytics.v1beta.IMessage[]; + + /** ChatRequest contextProvider. */ + public contextProvider?: ("inlineContext"|"conversationReference"|"dataAgentContext"); + + /** + * Creates a new ChatRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ChatRequest instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IChatRequest): google.cloud.geminidataanalytics.v1beta.ChatRequest; + + /** + * Encodes the specified ChatRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. + * @param message ChatRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IChatRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChatRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. + * @param message ChatRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IChatRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChatRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChatRequest; + + /** + * Decodes a ChatRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChatRequest; + + /** + * Verifies a ChatRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChatRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChatRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChatRequest; + + /** + * Creates a plain object from a ChatRequest message. Also converts values to other types if specified. + * @param message ChatRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChatRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChatRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChatRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAgentContext. */ + interface IDataAgentContext { + + /** DataAgentContext dataAgent */ + dataAgent?: (string|null); + + /** DataAgentContext credentials */ + credentials?: (google.cloud.geminidataanalytics.v1beta.ICredentials|null); + + /** DataAgentContext contextVersion */ + contextVersion?: (google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion|keyof typeof google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion|null); + } + + /** Represents a DataAgentContext. */ + class DataAgentContext implements IDataAgentContext { + + /** + * Constructs a new DataAgentContext. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDataAgentContext); + + /** DataAgentContext dataAgent. */ + public dataAgent: string; + + /** DataAgentContext credentials. */ + public credentials?: (google.cloud.geminidataanalytics.v1beta.ICredentials|null); + + /** DataAgentContext contextVersion. */ + public contextVersion: (google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion|keyof typeof google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion); + + /** + * Creates a new DataAgentContext instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAgentContext instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDataAgentContext): google.cloud.geminidataanalytics.v1beta.DataAgentContext; + + /** + * Encodes the specified DataAgentContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. + * @param message DataAgentContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDataAgentContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAgentContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. + * @param message DataAgentContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDataAgentContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DataAgentContext; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DataAgentContext; + + /** + * Verifies a DataAgentContext message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAgentContext message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAgentContext + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DataAgentContext; + + /** + * Creates a plain object from a DataAgentContext message. Also converts values to other types if specified. + * @param message DataAgentContext + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DataAgentContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAgentContext to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAgentContext + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataAgentContext { + + /** ContextVersion enum. */ + enum ContextVersion { + CONTEXT_VERSION_UNSPECIFIED = 0, + STAGING = 1, + PUBLISHED = 2 + } + } + + /** Properties of a ConversationReference. */ + interface IConversationReference { + + /** ConversationReference conversation */ + conversation?: (string|null); + + /** ConversationReference dataAgentContext */ + dataAgentContext?: (google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null); + } + + /** Represents a ConversationReference. */ + class ConversationReference implements IConversationReference { + + /** + * Constructs a new ConversationReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IConversationReference); + + /** ConversationReference conversation. */ + public conversation: string; + + /** ConversationReference dataAgentContext. */ + public dataAgentContext?: (google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null); + + /** + * Creates a new ConversationReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationReference instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IConversationReference): google.cloud.geminidataanalytics.v1beta.ConversationReference; + + /** + * Encodes the specified ConversationReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. + * @param message ConversationReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IConversationReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. + * @param message ConversationReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IConversationReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ConversationReference; + + /** + * Decodes a ConversationReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ConversationReference; + + /** + * Verifies a ConversationReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ConversationReference; + + /** + * Creates a plain object from a ConversationReference message. Also converts values to other types if specified. + * @param message ConversationReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ConversationReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Message. */ + interface IMessage { + + /** Message userMessage */ + userMessage?: (google.cloud.geminidataanalytics.v1beta.IUserMessage|null); + + /** Message systemMessage */ + systemMessage?: (google.cloud.geminidataanalytics.v1beta.ISystemMessage|null); + + /** Message timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** Message messageId */ + messageId?: (string|null); + } + + /** Represents a Message. */ + class Message implements IMessage { + + /** + * Constructs a new Message. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IMessage); + + /** Message userMessage. */ + public userMessage?: (google.cloud.geminidataanalytics.v1beta.IUserMessage|null); + + /** Message systemMessage. */ + public systemMessage?: (google.cloud.geminidataanalytics.v1beta.ISystemMessage|null); + + /** Message timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** Message messageId. */ + public messageId: string; + + /** Message kind. */ + public kind?: ("userMessage"|"systemMessage"); + + /** + * Creates a new Message instance using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IMessage): google.cloud.geminidataanalytics.v1beta.Message; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Message message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.Message; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.Message; + + /** + * Verifies a Message message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Message + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.Message; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @param message Message + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Message to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Message + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserMessage. */ + interface IUserMessage { + + /** UserMessage text */ + text?: (string|null); + } + + /** Represents a UserMessage. */ + class UserMessage implements IUserMessage { + + /** + * Constructs a new UserMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IUserMessage); + + /** UserMessage text. */ + public text?: (string|null); + + /** UserMessage kind. */ + public kind?: "text"; + + /** + * Creates a new UserMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns UserMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IUserMessage): google.cloud.geminidataanalytics.v1beta.UserMessage; + + /** + * Encodes the specified UserMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. + * @param message UserMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IUserMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. + * @param message UserMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IUserMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.UserMessage; + + /** + * Decodes a UserMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.UserMessage; + + /** + * Verifies a UserMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.UserMessage; + + /** + * Creates a plain object from a UserMessage message. Also converts values to other types if specified. + * @param message UserMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.UserMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SystemMessage. */ + interface ISystemMessage { + + /** SystemMessage text */ + text?: (google.cloud.geminidataanalytics.v1beta.ITextMessage|null); + + /** SystemMessage schema */ + schema?: (google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null); + + /** SystemMessage data */ + data?: (google.cloud.geminidataanalytics.v1beta.IDataMessage|null); + + /** SystemMessage analysis */ + analysis?: (google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null); + + /** SystemMessage chart */ + chart?: (google.cloud.geminidataanalytics.v1beta.IChartMessage|null); + + /** SystemMessage error */ + error?: (google.cloud.geminidataanalytics.v1beta.IErrorMessage|null); + + /** SystemMessage groupId */ + groupId?: (number|null); + } + + /** Represents a SystemMessage. */ + class SystemMessage implements ISystemMessage { + + /** + * Constructs a new SystemMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ISystemMessage); + + /** SystemMessage text. */ + public text?: (google.cloud.geminidataanalytics.v1beta.ITextMessage|null); + + /** SystemMessage schema. */ + public schema?: (google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null); + + /** SystemMessage data. */ + public data?: (google.cloud.geminidataanalytics.v1beta.IDataMessage|null); + + /** SystemMessage analysis. */ + public analysis?: (google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null); + + /** SystemMessage chart. */ + public chart?: (google.cloud.geminidataanalytics.v1beta.IChartMessage|null); + + /** SystemMessage error. */ + public error?: (google.cloud.geminidataanalytics.v1beta.IErrorMessage|null); + + /** SystemMessage groupId. */ + public groupId?: (number|null); + + /** SystemMessage kind. */ + public kind?: ("text"|"schema"|"data"|"analysis"|"chart"|"error"); + + /** + * Creates a new SystemMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ISystemMessage): google.cloud.geminidataanalytics.v1beta.SystemMessage; + + /** + * Encodes the specified SystemMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. + * @param message SystemMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ISystemMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. + * @param message SystemMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ISystemMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SystemMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.SystemMessage; + + /** + * Decodes a SystemMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.SystemMessage; + + /** + * Verifies a SystemMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SystemMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.SystemMessage; + + /** + * Creates a plain object from a SystemMessage message. Also converts values to other types if specified. + * @param message SystemMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.SystemMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SystemMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SystemMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TextMessage. */ + interface ITextMessage { + + /** TextMessage parts */ + parts?: (string[]|null); + } + + /** Represents a TextMessage. */ + class TextMessage implements ITextMessage { + + /** + * Constructs a new TextMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ITextMessage); + + /** TextMessage parts. */ + public parts: string[]; + + /** + * Creates a new TextMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns TextMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ITextMessage): google.cloud.geminidataanalytics.v1beta.TextMessage; + + /** + * Encodes the specified TextMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. + * @param message TextMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ITextMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. + * @param message TextMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ITextMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.TextMessage; + + /** + * Decodes a TextMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.TextMessage; + + /** + * Verifies a TextMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.TextMessage; + + /** + * Creates a plain object from a TextMessage message. Also converts values to other types if specified. + * @param message TextMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.TextMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaMessage. */ + interface ISchemaMessage { + + /** SchemaMessage query */ + query?: (google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null); + + /** SchemaMessage result */ + result?: (google.cloud.geminidataanalytics.v1beta.ISchemaResult|null); + } + + /** Represents a SchemaMessage. */ + class SchemaMessage implements ISchemaMessage { + + /** + * Constructs a new SchemaMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ISchemaMessage); + + /** SchemaMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null); + + /** SchemaMessage result. */ + public result?: (google.cloud.geminidataanalytics.v1beta.ISchemaResult|null); + + /** SchemaMessage kind. */ + public kind?: ("query"|"result"); + + /** + * Creates a new SchemaMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ISchemaMessage): google.cloud.geminidataanalytics.v1beta.SchemaMessage; + + /** + * Encodes the specified SchemaMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. + * @param message SchemaMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ISchemaMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. + * @param message SchemaMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ISchemaMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.SchemaMessage; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.SchemaMessage; + + /** + * Verifies a SchemaMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.SchemaMessage; + + /** + * Creates a plain object from a SchemaMessage message. Also converts values to other types if specified. + * @param message SchemaMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.SchemaMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaQuery. */ + interface ISchemaQuery { + + /** SchemaQuery question */ + question?: (string|null); + } + + /** Represents a SchemaQuery. */ + class SchemaQuery implements ISchemaQuery { + + /** + * Constructs a new SchemaQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ISchemaQuery); + + /** SchemaQuery question. */ + public question: string; + + /** + * Creates a new SchemaQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ISchemaQuery): google.cloud.geminidataanalytics.v1beta.SchemaQuery; + + /** + * Encodes the specified SchemaQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. + * @param message SchemaQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ISchemaQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. + * @param message SchemaQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ISchemaQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.SchemaQuery; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.SchemaQuery; + + /** + * Verifies a SchemaQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.SchemaQuery; + + /** + * Creates a plain object from a SchemaQuery message. Also converts values to other types if specified. + * @param message SchemaQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.SchemaQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaResult. */ + interface ISchemaResult { + + /** SchemaResult datasources */ + datasources?: (google.cloud.geminidataanalytics.v1beta.IDatasource[]|null); + } + + /** Represents a SchemaResult. */ + class SchemaResult implements ISchemaResult { + + /** + * Constructs a new SchemaResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ISchemaResult); + + /** SchemaResult datasources. */ + public datasources: google.cloud.geminidataanalytics.v1beta.IDatasource[]; + + /** + * Creates a new SchemaResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaResult instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ISchemaResult): google.cloud.geminidataanalytics.v1beta.SchemaResult; + + /** + * Encodes the specified SchemaResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. + * @param message SchemaResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ISchemaResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. + * @param message SchemaResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ISchemaResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.SchemaResult; + + /** + * Decodes a SchemaResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.SchemaResult; + + /** + * Verifies a SchemaResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.SchemaResult; + + /** + * Creates a plain object from a SchemaResult message. Also converts values to other types if specified. + * @param message SchemaResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.SchemaResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataMessage. */ + interface IDataMessage { + + /** DataMessage query */ + query?: (google.cloud.geminidataanalytics.v1beta.IDataQuery|null); + + /** DataMessage generatedSql */ + generatedSql?: (string|null); + + /** DataMessage result */ + result?: (google.cloud.geminidataanalytics.v1beta.IDataResult|null); + + /** DataMessage generatedLookerQuery */ + generatedLookerQuery?: (google.cloud.geminidataanalytics.v1beta.ILookerQuery|null); + + /** DataMessage bigQueryJob */ + bigQueryJob?: (google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null); + } + + /** Represents a DataMessage. */ + class DataMessage implements IDataMessage { + + /** + * Constructs a new DataMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDataMessage); + + /** DataMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1beta.IDataQuery|null); + + /** DataMessage generatedSql. */ + public generatedSql?: (string|null); + + /** DataMessage result. */ + public result?: (google.cloud.geminidataanalytics.v1beta.IDataResult|null); + + /** DataMessage generatedLookerQuery. */ + public generatedLookerQuery?: (google.cloud.geminidataanalytics.v1beta.ILookerQuery|null); + + /** DataMessage bigQueryJob. */ + public bigQueryJob?: (google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null); + + /** DataMessage kind. */ + public kind?: ("query"|"generatedSql"|"result"|"generatedLookerQuery"|"bigQueryJob"); + + /** + * Creates a new DataMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns DataMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDataMessage): google.cloud.geminidataanalytics.v1beta.DataMessage; + + /** + * Encodes the specified DataMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. + * @param message DataMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDataMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. + * @param message DataMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDataMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DataMessage; + + /** + * Decodes a DataMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DataMessage; + + /** + * Verifies a DataMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DataMessage; + + /** + * Creates a plain object from a DataMessage message. Also converts values to other types if specified. + * @param message DataMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DataMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookerQuery. */ + interface ILookerQuery { + + /** LookerQuery model */ + model?: (string|null); + + /** LookerQuery explore */ + explore?: (string|null); + + /** LookerQuery fields */ + fields?: (string[]|null); + + /** LookerQuery filters */ + filters?: (google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter[]|null); + + /** LookerQuery sorts */ + sorts?: (string[]|null); + + /** LookerQuery limit */ + limit?: (string|null); + } + + /** Represents a LookerQuery. */ + class LookerQuery implements ILookerQuery { + + /** + * Constructs a new LookerQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.ILookerQuery); + + /** LookerQuery model. */ + public model: string; + + /** LookerQuery explore. */ + public explore: string; + + /** LookerQuery fields. */ + public fields: string[]; + + /** LookerQuery filters. */ + public filters: google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter[]; + + /** LookerQuery sorts. */ + public sorts: string[]; + + /** LookerQuery limit. */ + public limit?: (string|null); + + /** + * Creates a new LookerQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns LookerQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.ILookerQuery): google.cloud.geminidataanalytics.v1beta.LookerQuery; + + /** + * Encodes the specified LookerQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.verify|verify} messages. + * @param message LookerQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.ILookerQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookerQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.verify|verify} messages. + * @param message LookerQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.ILookerQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookerQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.LookerQuery; + + /** + * Decodes a LookerQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.LookerQuery; + + /** + * Verifies a LookerQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookerQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookerQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.LookerQuery; + + /** + * Creates a plain object from a LookerQuery message. Also converts values to other types if specified. + * @param message LookerQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.LookerQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookerQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookerQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LookerQuery { + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter field */ + field?: (string|null); + + /** Filter value */ + value?: (string|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter); + + /** Filter field. */ + public field: string; + + /** Filter value. */ + public value: string; + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter): google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter; + + /** + * Verifies a Filter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataQuery. */ + interface IDataQuery { + + /** DataQuery question */ + question?: (string|null); + + /** DataQuery name */ + name?: (string|null); + + /** DataQuery datasources */ + datasources?: (google.cloud.geminidataanalytics.v1beta.IDatasource[]|null); + } + + /** Represents a DataQuery. */ + class DataQuery implements IDataQuery { + + /** + * Constructs a new DataQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDataQuery); + + /** DataQuery question. */ + public question: string; + + /** DataQuery name. */ + public name: string; + + /** DataQuery datasources. */ + public datasources: google.cloud.geminidataanalytics.v1beta.IDatasource[]; + + /** + * Creates a new DataQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDataQuery): google.cloud.geminidataanalytics.v1beta.DataQuery; + + /** + * Encodes the specified DataQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. + * @param message DataQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDataQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. + * @param message DataQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDataQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DataQuery; + + /** + * Decodes a DataQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DataQuery; + + /** + * Verifies a DataQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DataQuery; + + /** + * Creates a plain object from a DataQuery message. Also converts values to other types if specified. + * @param message DataQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DataQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataResult. */ + interface IDataResult { + + /** DataResult name */ + name?: (string|null); + + /** DataResult schema */ + schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + + /** DataResult data */ + data?: (google.protobuf.IStruct[]|null); + } + + /** Represents a DataResult. */ + class DataResult implements IDataResult { + + /** + * Constructs a new DataResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IDataResult); + + /** DataResult name. */ + public name: string; + + /** DataResult schema. */ + public schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + + /** DataResult data. */ + public data: google.protobuf.IStruct[]; + + /** + * Creates a new DataResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataResult instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IDataResult): google.cloud.geminidataanalytics.v1beta.DataResult; + + /** + * Encodes the specified DataResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. + * @param message DataResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IDataResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. + * @param message DataResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IDataResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.DataResult; + + /** + * Decodes a DataResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.DataResult; + + /** + * Verifies a DataResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.DataResult; + + /** + * Creates a plain object from a DataResult message. Also converts values to other types if specified. + * @param message DataResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.DataResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryJob. */ + interface IBigQueryJob { + + /** BigQueryJob projectId */ + projectId?: (string|null); + + /** BigQueryJob jobId */ + jobId?: (string|null); + + /** BigQueryJob location */ + location?: (string|null); + + /** BigQueryJob destinationTable */ + destinationTable?: (google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null); + + /** BigQueryJob schema */ + schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + } + + /** Represents a BigQueryJob. */ + class BigQueryJob implements IBigQueryJob { + + /** + * Constructs a new BigQueryJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IBigQueryJob); + + /** BigQueryJob projectId. */ + public projectId: string; + + /** BigQueryJob jobId. */ + public jobId: string; + + /** BigQueryJob location. */ + public location: string; + + /** BigQueryJob destinationTable. */ + public destinationTable?: (google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null); + + /** BigQueryJob schema. */ + public schema?: (google.cloud.geminidataanalytics.v1beta.ISchema|null); + + /** + * Creates a new BigQueryJob instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryJob instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IBigQueryJob): google.cloud.geminidataanalytics.v1beta.BigQueryJob; + + /** + * Encodes the specified BigQueryJob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. + * @param message BigQueryJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IBigQueryJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryJob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. + * @param message BigQueryJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IBigQueryJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.BigQueryJob; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.BigQueryJob; + + /** + * Verifies a BigQueryJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.BigQueryJob; + + /** + * Creates a plain object from a BigQueryJob message. Also converts values to other types if specified. + * @param message BigQueryJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.BigQueryJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisMessage. */ + interface IAnalysisMessage { + + /** AnalysisMessage query */ + query?: (google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null); + + /** AnalysisMessage progressEvent */ + progressEvent?: (google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null); + } + + /** Represents an AnalysisMessage. */ + class AnalysisMessage implements IAnalysisMessage { + + /** + * Constructs a new AnalysisMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisMessage); + + /** AnalysisMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null); + + /** AnalysisMessage progressEvent. */ + public progressEvent?: (google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null); + + /** AnalysisMessage kind. */ + public kind?: ("query"|"progressEvent"); + + /** + * Creates a new AnalysisMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisMessage): google.cloud.geminidataanalytics.v1beta.AnalysisMessage; + + /** + * Encodes the specified AnalysisMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. + * @param message AnalysisMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IAnalysisMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. + * @param message AnalysisMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IAnalysisMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.AnalysisMessage; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.AnalysisMessage; + + /** + * Verifies an AnalysisMessage message. + * @param message Plain 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 AnalysisMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.AnalysisMessage; + + /** + * Creates a plain object from an AnalysisMessage message. Also converts values to other types if specified. + * @param message AnalysisMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.AnalysisMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisQuery. */ + interface IAnalysisQuery { + + /** AnalysisQuery question */ + question?: (string|null); + + /** AnalysisQuery dataResultNames */ + dataResultNames?: (string[]|null); + } + + /** Represents an AnalysisQuery. */ + class AnalysisQuery implements IAnalysisQuery { + + /** + * Constructs a new AnalysisQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisQuery); + + /** AnalysisQuery question. */ + public question: string; + + /** AnalysisQuery dataResultNames. */ + public dataResultNames: string[]; + + /** + * Creates a new AnalysisQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisQuery): google.cloud.geminidataanalytics.v1beta.AnalysisQuery; + + /** + * Encodes the specified AnalysisQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. + * @param message AnalysisQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IAnalysisQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. + * @param message AnalysisQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IAnalysisQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.AnalysisQuery; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.AnalysisQuery; + + /** + * Verifies an AnalysisQuery message. + * @param message Plain 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 AnalysisQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.AnalysisQuery; + + /** + * Creates a plain object from an AnalysisQuery message. Also converts values to other types if specified. + * @param message AnalysisQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.AnalysisQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisEvent. */ + interface IAnalysisEvent { + + /** AnalysisEvent plannerReasoning */ + plannerReasoning?: (string|null); + + /** AnalysisEvent coderInstruction */ + coderInstruction?: (string|null); + + /** AnalysisEvent code */ + code?: (string|null); + + /** AnalysisEvent executionOutput */ + executionOutput?: (string|null); + + /** AnalysisEvent executionError */ + executionError?: (string|null); + + /** AnalysisEvent resultVegaChartJson */ + resultVegaChartJson?: (string|null); + + /** AnalysisEvent resultNaturalLanguage */ + resultNaturalLanguage?: (string|null); + + /** AnalysisEvent resultCsvData */ + resultCsvData?: (string|null); + + /** AnalysisEvent resultReferenceData */ + resultReferenceData?: (string|null); + + /** AnalysisEvent error */ + error?: (string|null); + } + + /** Represents an AnalysisEvent. */ + class AnalysisEvent implements IAnalysisEvent { + + /** + * Constructs a new AnalysisEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisEvent); + + /** AnalysisEvent plannerReasoning. */ + public plannerReasoning?: (string|null); + + /** AnalysisEvent coderInstruction. */ + public coderInstruction?: (string|null); + + /** AnalysisEvent code. */ + public code?: (string|null); + + /** AnalysisEvent executionOutput. */ + public executionOutput?: (string|null); + + /** AnalysisEvent executionError. */ + public executionError?: (string|null); + + /** AnalysisEvent resultVegaChartJson. */ + public resultVegaChartJson?: (string|null); + + /** AnalysisEvent resultNaturalLanguage. */ + public resultNaturalLanguage?: (string|null); + + /** AnalysisEvent resultCsvData. */ + public resultCsvData?: (string|null); + + /** AnalysisEvent resultReferenceData. */ + public resultReferenceData?: (string|null); + + /** AnalysisEvent error. */ + public error?: (string|null); + + /** AnalysisEvent kind. */ + public kind?: ("plannerReasoning"|"coderInstruction"|"code"|"executionOutput"|"executionError"|"resultVegaChartJson"|"resultNaturalLanguage"|"resultCsvData"|"resultReferenceData"|"error"); + + /** + * Creates a new AnalysisEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisEvent instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IAnalysisEvent): google.cloud.geminidataanalytics.v1beta.AnalysisEvent; + + /** + * Encodes the specified AnalysisEvent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. + * @param message AnalysisEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IAnalysisEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisEvent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. + * @param message AnalysisEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IAnalysisEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.AnalysisEvent; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.AnalysisEvent; + + /** + * Verifies an AnalysisEvent message. + * @param message Plain 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 AnalysisEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.AnalysisEvent; + + /** + * Creates a plain object from an AnalysisEvent message. Also converts values to other types if specified. + * @param message AnalysisEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.AnalysisEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartMessage. */ + interface IChartMessage { + + /** ChartMessage query */ + query?: (google.cloud.geminidataanalytics.v1beta.IChartQuery|null); + + /** ChartMessage result */ + result?: (google.cloud.geminidataanalytics.v1beta.IChartResult|null); + } + + /** Represents a ChartMessage. */ + class ChartMessage implements IChartMessage { + + /** + * Constructs a new ChartMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IChartMessage); + + /** ChartMessage query. */ + public query?: (google.cloud.geminidataanalytics.v1beta.IChartQuery|null); + + /** ChartMessage result. */ + public result?: (google.cloud.geminidataanalytics.v1beta.IChartResult|null); + + /** ChartMessage kind. */ + public kind?: ("query"|"result"); + + /** + * Creates a new ChartMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IChartMessage): google.cloud.geminidataanalytics.v1beta.ChartMessage; + + /** + * Encodes the specified ChartMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. + * @param message ChartMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IChartMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. + * @param message ChartMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IChartMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChartMessage; + + /** + * Decodes a ChartMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChartMessage; + + /** + * Verifies a ChartMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChartMessage; + + /** + * Creates a plain object from a ChartMessage message. Also converts values to other types if specified. + * @param message ChartMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChartMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartQuery. */ + interface IChartQuery { + + /** ChartQuery instructions */ + instructions?: (string|null); + + /** ChartQuery dataResultName */ + dataResultName?: (string|null); + } + + /** Represents a ChartQuery. */ + class ChartQuery implements IChartQuery { + + /** + * Constructs a new ChartQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IChartQuery); + + /** ChartQuery instructions. */ + public instructions: string; + + /** ChartQuery dataResultName. */ + public dataResultName: string; + + /** + * Creates a new ChartQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartQuery instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IChartQuery): google.cloud.geminidataanalytics.v1beta.ChartQuery; + + /** + * Encodes the specified ChartQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. + * @param message ChartQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IChartQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. + * @param message ChartQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IChartQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChartQuery; + + /** + * Decodes a ChartQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChartQuery; + + /** + * Verifies a ChartQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartQuery + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChartQuery; + + /** + * Creates a plain object from a ChartQuery message. Also converts values to other types if specified. + * @param message ChartQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChartQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChartResult. */ + interface IChartResult { + + /** ChartResult vegaConfig */ + vegaConfig?: (google.protobuf.IStruct|null); + + /** ChartResult image */ + image?: (google.cloud.geminidataanalytics.v1beta.IBlob|null); + } + + /** Represents a ChartResult. */ + class ChartResult implements IChartResult { + + /** + * Constructs a new ChartResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IChartResult); + + /** ChartResult vegaConfig. */ + public vegaConfig?: (google.protobuf.IStruct|null); + + /** ChartResult image. */ + public image?: (google.cloud.geminidataanalytics.v1beta.IBlob|null); + + /** + * Creates a new ChartResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartResult instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IChartResult): google.cloud.geminidataanalytics.v1beta.ChartResult; + + /** + * Encodes the specified ChartResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. + * @param message ChartResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IChartResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. + * @param message ChartResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IChartResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ChartResult; + + /** + * Decodes a ChartResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ChartResult; + + /** + * Verifies a ChartResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ChartResult; + + /** + * Creates a plain object from a ChartResult message. Also converts values to other types if specified. + * @param message ChartResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ChartResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorMessage. */ + interface IErrorMessage { + + /** ErrorMessage text */ + text?: (string|null); + } + + /** Represents an ErrorMessage. */ + class ErrorMessage implements IErrorMessage { + + /** + * Constructs a new ErrorMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IErrorMessage); + + /** ErrorMessage text. */ + public text: string; + + /** + * Creates a new ErrorMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IErrorMessage): google.cloud.geminidataanalytics.v1beta.ErrorMessage; + + /** + * Encodes the specified ErrorMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. + * @param message ErrorMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. + * @param message ErrorMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ErrorMessage; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ErrorMessage; + + /** + * Verifies an ErrorMessage message. + * @param message Plain 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 ErrorMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ErrorMessage; + + /** + * Creates a plain object from an ErrorMessage message. Also converts values to other types if specified. + * @param message ErrorMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ErrorMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Blob. */ + interface IBlob { + + /** Blob mimeType */ + mimeType?: (string|null); + + /** Blob data */ + data?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Blob. */ + class Blob implements IBlob { + + /** + * Constructs a new Blob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IBlob); + + /** Blob mimeType. */ + public mimeType: string; + + /** Blob data. */ + public data: (Uint8Array|Buffer|string); + + /** + * Creates a new Blob instance using the specified properties. + * @param [properties] Properties to set + * @returns Blob instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IBlob): google.cloud.geminidataanalytics.v1beta.Blob; + + /** + * Encodes the specified Blob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Blob.verify|verify} messages. + * @param message Blob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Blob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Blob.verify|verify} messages. + * @param message Blob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IBlob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Blob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.Blob; + + /** + * Decodes a Blob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.Blob; + + /** + * Verifies a Blob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Blob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Blob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.Blob; + + /** + * Creates a plain object from a Blob message. Also converts values to other types if specified. + * @param message Blob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.Blob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Blob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Blob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { + + /** + * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { + + /** SetIamPolicyRequest resource */ + resource?: (string|null); + + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { + + /** + * Constructs a new SetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); + + /** SetIamPolicyRequest resource. */ + public resource: string; + + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; + + /** + * Verifies a SetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { + + /** GetIamPolicyRequest resource */ + resource?: (string|null); + + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } + + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { + + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + + /** GetIamPolicyRequest resource. */ + public resource: string; + + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; + + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { + + /** TestIamPermissionsRequest resource */ + resource?: (string|null); + + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + + /** TestIamPermissionsRequest resource. */ + public resource: string; + + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; + + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { + + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; + + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { + + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } + + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { + + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; + + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + + /** Policy etag */ + etag?: (Uint8Array|Buffer|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + + /** Policy etag. */ + public etag: (Uint8Array|Buffer|string); + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig message. + * @param message Plain 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; + + /** + * Verifies an Expr message. + * @param message Plain 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 Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-geminidataanalytics/protos/protos.js b/packages/google-cloud-geminidataanalytics/protos/protos.js new file mode 100644 index 000000000000..ec207126cbba --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/protos.js @@ -0,0 +1,66453 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_geminidataanalytics_protos || ($protobuf.roots._google_cloud_geminidataanalytics_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.geminidataanalytics = (function() { + + /** + * Namespace geminidataanalytics. + * @memberof google.cloud + * @namespace + */ + var geminidataanalytics = {}; + + geminidataanalytics.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.cloud.geminidataanalytics + * @namespace + */ + var v1alpha = {}; + + v1alpha.Context = (function() { + + /** + * Properties of a Context. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IContext + * @property {string|null} [systemInstruction] Context systemInstruction + * @property {google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences|null} [datasourceReferences] Context datasourceReferences + * @property {google.cloud.geminidataanalytics.v1alpha.IConversationOptions|null} [options] Context options + * @property {Array.|null} [exampleQueries] Context exampleQueries + * @property {Array.|null} [glossaryTerms] Context glossaryTerms + * @property {Array.|null} [schemaRelationships] Context schemaRelationships + */ + + /** + * Constructs a new Context. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Context. + * @implements IContext + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IContext=} [properties] Properties to set + */ + function Context(properties) { + this.exampleQueries = []; + this.glossaryTerms = []; + this.schemaRelationships = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Context systemInstruction. + * @member {string} systemInstruction + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @instance + */ + Context.prototype.systemInstruction = ""; + + /** + * Context datasourceReferences. + * @member {google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences|null|undefined} datasourceReferences + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @instance + */ + Context.prototype.datasourceReferences = null; + + /** + * Context options. + * @member {google.cloud.geminidataanalytics.v1alpha.IConversationOptions|null|undefined} options + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @instance + */ + Context.prototype.options = null; + + /** + * Context exampleQueries. + * @member {Array.} exampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @instance + */ + Context.prototype.exampleQueries = $util.emptyArray; + + /** + * Context glossaryTerms. + * @member {Array.} glossaryTerms + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @instance + */ + Context.prototype.glossaryTerms = $util.emptyArray; + + /** + * Context schemaRelationships. + * @member {Array.} schemaRelationships + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @instance + */ + Context.prototype.schemaRelationships = $util.emptyArray; + + /** + * Creates a new Context instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Context} Context instance + */ + Context.create = function create(properties) { + return new Context(properties); + }; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemInstruction != null && Object.hasOwnProperty.call(message, "systemInstruction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.systemInstruction); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exampleQueries != null && message.exampleQueries.length) + for (var i = 0; i < message.exampleQueries.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.encode(message.exampleQueries[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.datasourceReferences != null && Object.hasOwnProperty.call(message, "datasourceReferences")) + $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.encode(message.datasourceReferences, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.glossaryTerms != null && message.glossaryTerms.length) + for (var i = 0; i < message.glossaryTerms.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.encode(message.glossaryTerms[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.schemaRelationships != null && message.schemaRelationships.length) + for (var i = 0; i < message.schemaRelationships.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.encode(message.schemaRelationships[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Context message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Context(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.systemInstruction = reader.string(); + break; + } + case 7: { + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.decode(reader, reader.uint32()); + break; + } + case 3: { + message.options = $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.exampleQueries && message.exampleQueries.length)) + message.exampleQueries = []; + message.exampleQueries.push($root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.glossaryTerms && message.glossaryTerms.length)) + message.glossaryTerms = []; + message.glossaryTerms.push($root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.schemaRelationships && message.schemaRelationships.length)) + message.schemaRelationships = []; + message.schemaRelationships.push($root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Context message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Context.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) + if (!$util.isString(message.systemInstruction)) + return "systemInstruction: string expected"; + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.verify(message.datasourceReferences); + if (error) + return "datasourceReferences." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (!Array.isArray(message.exampleQueries)) + return "exampleQueries: array expected"; + for (var i = 0; i < message.exampleQueries.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify(message.exampleQueries[i]); + if (error) + return "exampleQueries." + error; + } + } + if (message.glossaryTerms != null && message.hasOwnProperty("glossaryTerms")) { + if (!Array.isArray(message.glossaryTerms)) + return "glossaryTerms: array expected"; + for (var i = 0; i < message.glossaryTerms.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.verify(message.glossaryTerms[i]); + if (error) + return "glossaryTerms." + error; + } + } + if (message.schemaRelationships != null && message.hasOwnProperty("schemaRelationships")) { + if (!Array.isArray(message.schemaRelationships)) + return "schemaRelationships: array expected"; + for (var i = 0; i < message.schemaRelationships.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.verify(message.schemaRelationships[i]); + if (error) + return "schemaRelationships." + error; + } + } + return null; + }; + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Context} Context + */ + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Context) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Context(); + if (object.systemInstruction != null) + message.systemInstruction = String(object.systemInstruction); + if (object.datasourceReferences != null) { + if (typeof object.datasourceReferences !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.datasourceReferences: object expected"); + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.fromObject(object.datasourceReferences); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.options: object expected"); + message.options = $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions.fromObject(object.options); + } + if (object.exampleQueries) { + if (!Array.isArray(object.exampleQueries)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.exampleQueries: array expected"); + message.exampleQueries = []; + for (var i = 0; i < object.exampleQueries.length; ++i) { + if (typeof object.exampleQueries[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.exampleQueries: object expected"); + message.exampleQueries[i] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.fromObject(object.exampleQueries[i]); + } + } + if (object.glossaryTerms) { + if (!Array.isArray(object.glossaryTerms)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.glossaryTerms: array expected"); + message.glossaryTerms = []; + for (var i = 0; i < object.glossaryTerms.length; ++i) { + if (typeof object.glossaryTerms[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.glossaryTerms: object expected"); + message.glossaryTerms[i] = $root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.fromObject(object.glossaryTerms[i]); + } + } + if (object.schemaRelationships) { + if (!Array.isArray(object.schemaRelationships)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.schemaRelationships: array expected"); + message.schemaRelationships = []; + for (var i = 0; i < object.schemaRelationships.length; ++i) { + if (typeof object.schemaRelationships[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.schemaRelationships: object expected"); + message.schemaRelationships[i] = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.fromObject(object.schemaRelationships[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context} message Context + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Context.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.exampleQueries = []; + object.glossaryTerms = []; + object.schemaRelationships = []; + } + if (options.defaults) { + object.systemInstruction = ""; + object.options = null; + object.datasourceReferences = null; + } + if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) + object.systemInstruction = message.systemInstruction; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions.toObject(message.options, options); + if (message.exampleQueries && message.exampleQueries.length) { + object.exampleQueries = []; + for (var j = 0; j < message.exampleQueries.length; ++j) + object.exampleQueries[j] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.toObject(message.exampleQueries[j], options); + } + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) + object.datasourceReferences = $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.toObject(message.datasourceReferences, options); + if (message.glossaryTerms && message.glossaryTerms.length) { + object.glossaryTerms = []; + for (var j = 0; j < message.glossaryTerms.length; ++j) + object.glossaryTerms[j] = $root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.toObject(message.glossaryTerms[j], options); + } + if (message.schemaRelationships && message.schemaRelationships.length) { + object.schemaRelationships = []; + for (var j = 0; j < message.schemaRelationships.length; ++j) + object.schemaRelationships[j] = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.toObject(message.schemaRelationships[j], options); + } + return object; + }; + + /** + * Converts this Context to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @instance + * @returns {Object.} JSON object + */ + Context.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Context + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Context.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Context"; + }; + + Context.SchemaRelationship = (function() { + + /** + * Properties of a SchemaRelationship. + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @interface ISchemaRelationship + * @property {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null} [leftSchemaPaths] SchemaRelationship leftSchemaPaths + * @property {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null} [rightSchemaPaths] SchemaRelationship rightSchemaPaths + * @property {Array.|null} [sources] SchemaRelationship sources + * @property {number|null} [confidenceScore] SchemaRelationship confidenceScore + */ + + /** + * Constructs a new SchemaRelationship. + * @memberof google.cloud.geminidataanalytics.v1alpha.Context + * @classdesc Represents a SchemaRelationship. + * @implements ISchemaRelationship + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship=} [properties] Properties to set + */ + function SchemaRelationship(properties) { + this.sources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaRelationship leftSchemaPaths. + * @member {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null|undefined} leftSchemaPaths + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.leftSchemaPaths = null; + + /** + * SchemaRelationship rightSchemaPaths. + * @member {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths|null|undefined} rightSchemaPaths + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.rightSchemaPaths = null; + + /** + * SchemaRelationship sources. + * @member {Array.} sources + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.sources = $util.emptyArray; + + /** + * SchemaRelationship confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.confidenceScore = 0; + + /** + * Creates a new SchemaRelationship instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship} SchemaRelationship instance + */ + SchemaRelationship.create = function create(properties) { + return new SchemaRelationship(properties); + }; + + /** + * Encodes the specified SchemaRelationship message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship} message SchemaRelationship message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRelationship.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.leftSchemaPaths != null && Object.hasOwnProperty.call(message, "leftSchemaPaths")) + $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.encode(message.leftSchemaPaths, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rightSchemaPaths != null && Object.hasOwnProperty.call(message, "rightSchemaPaths")) + $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.encode(message.rightSchemaPaths, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sources != null && message.sources.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.sources.length; ++i) + writer.int32(message.sources[i]); + writer.ldelim(); + } + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidenceScore); + return writer; + }; + + /** + * Encodes the specified SchemaRelationship message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.ISchemaRelationship} message SchemaRelationship message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRelationship.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRelationship message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship} SchemaRelationship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRelationship.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.leftSchemaPaths = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.decode(reader, reader.uint32()); + break; + } + case 2: { + message.rightSchemaPaths = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.sources && message.sources.length)) + message.sources = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sources.push(reader.int32()); + } else + message.sources.push(reader.int32()); + break; + } + case 4: { + message.confidenceScore = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRelationship message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship} SchemaRelationship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRelationship.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRelationship message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRelationship.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.leftSchemaPaths != null && message.hasOwnProperty("leftSchemaPaths")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.verify(message.leftSchemaPaths); + if (error) + return "leftSchemaPaths." + error; + } + if (message.rightSchemaPaths != null && message.hasOwnProperty("rightSchemaPaths")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.verify(message.rightSchemaPaths); + if (error) + return "rightSchemaPaths." + error; + } + if (message.sources != null && message.hasOwnProperty("sources")) { + if (!Array.isArray(message.sources)) + return "sources: array expected"; + for (var i = 0; i < message.sources.length; ++i) + switch (message.sources[i]) { + default: + return "sources: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + return null; + }; + + /** + * Creates a SchemaRelationship message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship} SchemaRelationship + */ + SchemaRelationship.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship(); + if (object.leftSchemaPaths != null) { + if (typeof object.leftSchemaPaths !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.leftSchemaPaths: object expected"); + message.leftSchemaPaths = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.fromObject(object.leftSchemaPaths); + } + if (object.rightSchemaPaths != null) { + if (typeof object.rightSchemaPaths !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.rightSchemaPaths: object expected"); + message.rightSchemaPaths = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.fromObject(object.rightSchemaPaths); + } + if (object.sources) { + if (!Array.isArray(object.sources)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.sources: array expected"); + message.sources = []; + for (var i = 0; i < object.sources.length; ++i) + switch (object.sources[i]) { + default: + if (typeof object.sources[i] === "number") { + message.sources[i] = object.sources[i]; + break; + } + case "SOURCE_UNSPECIFIED": + case 0: + message.sources[i] = 0; + break; + case "BIGQUERY_JOB_HISTORY": + case 1: + message.sources[i] = 1; + break; + case "LLM_SUGGESTED": + case 2: + message.sources[i] = 2; + break; + case "BIGQUERY_TABLE_CONSTRAINTS": + case 3: + message.sources[i] = 3; + break; + } + } + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + return message; + }; + + /** + * Creates a plain object from a SchemaRelationship message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship} message SchemaRelationship + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRelationship.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sources = []; + if (options.defaults) { + object.leftSchemaPaths = null; + object.rightSchemaPaths = null; + object.confidenceScore = 0; + } + if (message.leftSchemaPaths != null && message.hasOwnProperty("leftSchemaPaths")) + object.leftSchemaPaths = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.toObject(message.leftSchemaPaths, options); + if (message.rightSchemaPaths != null && message.hasOwnProperty("rightSchemaPaths")) + object.rightSchemaPaths = $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.toObject(message.rightSchemaPaths, options); + if (message.sources && message.sources.length) { + object.sources = []; + for (var j = 0; j < message.sources.length; ++j) + object.sources[j] = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.Source[message.sources[j]] === undefined ? message.sources[j] : $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.Source[message.sources[j]] : message.sources[j]; + } + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + return object; + }; + + /** + * Converts this SchemaRelationship to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @instance + * @returns {Object.} JSON object + */ + SchemaRelationship.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRelationship + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRelationship.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship"; + }; + + SchemaRelationship.SchemaPaths = (function() { + + /** + * Properties of a SchemaPaths. + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @interface ISchemaPaths + * @property {string|null} [tableFqn] SchemaPaths tableFqn + * @property {Array.|null} [paths] SchemaPaths paths + */ + + /** + * Constructs a new SchemaPaths. + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship + * @classdesc Represents a SchemaPaths. + * @implements ISchemaPaths + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths=} [properties] Properties to set + */ + function SchemaPaths(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]]; + } + + /** + * SchemaPaths tableFqn. + * @member {string} tableFqn + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @instance + */ + SchemaPaths.prototype.tableFqn = ""; + + /** + * SchemaPaths paths. + * @member {Array.} paths + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @instance + */ + SchemaPaths.prototype.paths = $util.emptyArray; + + /** + * Creates a new SchemaPaths instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths} SchemaPaths instance + */ + SchemaPaths.create = function create(properties) { + return new SchemaPaths(properties); + }; + + /** + * Encodes the specified SchemaPaths message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths} message SchemaPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaPaths.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableFqn != null && Object.hasOwnProperty.call(message, "tableFqn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableFqn); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified SchemaPaths message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.ISchemaPaths} message SchemaPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaPaths.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaPaths message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths} SchemaPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaPaths.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableFqn = reader.string(); + break; + } + case 2: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaPaths message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths} SchemaPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaPaths.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaPaths message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaPaths.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableFqn != null && message.hasOwnProperty("tableFqn")) + if (!$util.isString(message.tableFqn)) + return "tableFqn: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a SchemaPaths message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths} SchemaPaths + */ + SchemaPaths.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths(); + if (object.tableFqn != null) + message.tableFqn = String(object.tableFqn); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths.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 SchemaPaths message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths} message SchemaPaths + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaPaths.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) + object.tableFqn = ""; + if (message.tableFqn != null && message.hasOwnProperty("tableFqn")) + object.tableFqn = message.tableFqn; + 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 SchemaPaths to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @instance + * @returns {Object.} JSON object + */ + SchemaPaths.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaPaths + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaPaths.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.SchemaPaths"; + }; + + return SchemaPaths; + })(); + + /** + * Source enum. + * @name google.cloud.geminidataanalytics.v1alpha.Context.SchemaRelationship.Source + * @enum {number} + * @property {number} SOURCE_UNSPECIFIED=0 SOURCE_UNSPECIFIED value + * @property {number} BIGQUERY_JOB_HISTORY=1 BIGQUERY_JOB_HISTORY value + * @property {number} LLM_SUGGESTED=2 LLM_SUGGESTED value + * @property {number} BIGQUERY_TABLE_CONSTRAINTS=3 BIGQUERY_TABLE_CONSTRAINTS value + */ + SchemaRelationship.Source = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BIGQUERY_JOB_HISTORY"] = 1; + values[valuesById[2] = "LLM_SUGGESTED"] = 2; + values[valuesById[3] = "BIGQUERY_TABLE_CONSTRAINTS"] = 3; + return values; + })(); + + return SchemaRelationship; + })(); + + return Context; + })(); + + v1alpha.ExampleQuery = (function() { + + /** + * Properties of an ExampleQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IExampleQuery + * @property {string|null} [sqlQuery] ExampleQuery sqlQuery + * @property {string|null} [naturalLanguageQuestion] ExampleQuery naturalLanguageQuestion + */ + + /** + * Constructs a new ExampleQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an ExampleQuery. + * @implements IExampleQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQuery=} [properties] Properties to set + */ + function ExampleQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExampleQuery sqlQuery. + * @member {string|null|undefined} sqlQuery + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @instance + */ + ExampleQuery.prototype.sqlQuery = null; + + /** + * ExampleQuery naturalLanguageQuestion. + * @member {string} naturalLanguageQuestion + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @instance + */ + ExampleQuery.prototype.naturalLanguageQuestion = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExampleQuery query. + * @member {"sqlQuery"|undefined} query + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @instance + */ + Object.defineProperty(ExampleQuery.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["sqlQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExampleQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQuery} ExampleQuery instance + */ + ExampleQuery.create = function create(properties) { + return new ExampleQuery(properties); + }; + + /** + * Encodes the specified ExampleQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQuery} message ExampleQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.naturalLanguageQuestion != null && Object.hasOwnProperty.call(message, "naturalLanguageQuestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.naturalLanguageQuestion); + if (message.sqlQuery != null && Object.hasOwnProperty.call(message, "sqlQuery")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.sqlQuery); + return writer; + }; + + /** + * Encodes the specified ExampleQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQuery} message ExampleQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQuery} ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 101: { + message.sqlQuery = reader.string(); + break; + } + case 1: { + message.naturalLanguageQuestion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQuery} ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExampleQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExampleQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { + properties.query = 1; + if (!$util.isString(message.sqlQuery)) + return "sqlQuery: string expected"; + } + if (message.naturalLanguageQuestion != null && message.hasOwnProperty("naturalLanguageQuestion")) + if (!$util.isString(message.naturalLanguageQuestion)) + return "naturalLanguageQuestion: string expected"; + return null; + }; + + /** + * Creates an ExampleQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQuery} ExampleQuery + */ + ExampleQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery(); + if (object.sqlQuery != null) + message.sqlQuery = String(object.sqlQuery); + if (object.naturalLanguageQuestion != null) + message.naturalLanguageQuestion = String(object.naturalLanguageQuestion); + return message; + }; + + /** + * Creates a plain object from an ExampleQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ExampleQuery} message ExampleQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExampleQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.naturalLanguageQuestion = ""; + if (message.naturalLanguageQuestion != null && message.hasOwnProperty("naturalLanguageQuestion")) + object.naturalLanguageQuestion = message.naturalLanguageQuestion; + if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { + object.sqlQuery = message.sqlQuery; + if (options.oneofs) + object.query = "sqlQuery"; + } + return object; + }; + + /** + * Converts this ExampleQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @instance + * @returns {Object.} JSON object + */ + ExampleQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExampleQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExampleQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ExampleQuery"; + }; + + return ExampleQuery; + })(); + + v1alpha.GlossaryTerm = (function() { + + /** + * Properties of a GlossaryTerm. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IGlossaryTerm + * @property {string|null} [displayName] GlossaryTerm displayName + * @property {string|null} [description] GlossaryTerm description + * @property {Array.|null} [labels] GlossaryTerm labels + */ + + /** + * Constructs a new GlossaryTerm. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a GlossaryTerm. + * @implements IGlossaryTerm + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm=} [properties] Properties to set + */ + function GlossaryTerm(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]]; + } + + /** + * GlossaryTerm displayName. + * @member {string} displayName + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @instance + */ + GlossaryTerm.prototype.displayName = ""; + + /** + * GlossaryTerm description. + * @member {string} description + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @instance + */ + GlossaryTerm.prototype.description = ""; + + /** + * GlossaryTerm labels. + * @member {Array.} labels + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @instance + */ + GlossaryTerm.prototype.labels = $util.emptyArray; + + /** + * Creates a new GlossaryTerm instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.GlossaryTerm} GlossaryTerm instance + */ + GlossaryTerm.create = function create(properties) { + return new GlossaryTerm(properties); + }; + + /** + * Encodes the specified GlossaryTerm message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm} message GlossaryTerm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlossaryTerm.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.labels[i]); + return writer; + }; + + /** + * Encodes the specified GlossaryTerm message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGlossaryTerm} message GlossaryTerm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlossaryTerm.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GlossaryTerm message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.GlossaryTerm} GlossaryTerm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlossaryTerm.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GlossaryTerm message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.GlossaryTerm} GlossaryTerm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlossaryTerm.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GlossaryTerm message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GlossaryTerm.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) + if (!$util.isString(message.labels[i])) + return "labels: string[] expected"; + } + return null; + }; + + /** + * Creates a GlossaryTerm message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.GlossaryTerm} GlossaryTerm + */ + GlossaryTerm.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.GlossaryTerm(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.GlossaryTerm.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) + message.labels[i] = String(object.labels[i]); + } + return message; + }; + + /** + * Creates a plain object from a GlossaryTerm message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.GlossaryTerm} message GlossaryTerm + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GlossaryTerm.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.displayName = ""; + object.description = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = message.labels[j]; + } + return object; + }; + + /** + * Converts this GlossaryTerm to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @instance + * @returns {Object.} JSON object + */ + GlossaryTerm.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GlossaryTerm + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.GlossaryTerm + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GlossaryTerm.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.GlossaryTerm"; + }; + + return GlossaryTerm; + })(); + + v1alpha.ConversationOptions = (function() { + + /** + * Properties of a ConversationOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IConversationOptions + * @property {google.cloud.geminidataanalytics.v1alpha.IChartOptions|null} [chart] ConversationOptions chart + * @property {google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions|null} [analysis] ConversationOptions analysis + */ + + /** + * Constructs a new ConversationOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ConversationOptions. + * @implements IConversationOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationOptions=} [properties] Properties to set + */ + function ConversationOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationOptions chart. + * @member {google.cloud.geminidataanalytics.v1alpha.IChartOptions|null|undefined} chart + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @instance + */ + ConversationOptions.prototype.chart = null; + + /** + * ConversationOptions analysis. + * @member {google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions|null|undefined} analysis + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @instance + */ + ConversationOptions.prototype.analysis = null; + + /** + * Creates a new ConversationOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationOptions} ConversationOptions instance + */ + ConversationOptions.create = function create(properties) { + return new ConversationOptions(properties); + }; + + /** + * Encodes the specified ConversationOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationOptions} message ConversationOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chart != null && Object.hasOwnProperty.call(message, "chart")) + $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.encode(message.chart, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) + $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.encode(message.analysis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationOptions} message ConversationOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationOptions} ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.chart = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.decode(reader, reader.uint32()); + break; + } + case 2: { + message.analysis = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationOptions} ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chart != null && message.hasOwnProperty("chart")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.verify(message.chart); + if (error) + return "chart." + error; + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.verify(message.analysis); + if (error) + return "analysis." + error; + } + return null; + }; + + /** + * Creates a ConversationOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationOptions} ConversationOptions + */ + ConversationOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ConversationOptions(); + if (object.chart != null) { + if (typeof object.chart !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ConversationOptions.chart: object expected"); + message.chart = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.fromObject(object.chart); + } + if (object.analysis != null) { + if (typeof object.analysis !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ConversationOptions.analysis: object expected"); + message.analysis = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.fromObject(object.analysis); + } + return message; + }; + + /** + * Creates a plain object from a ConversationOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ConversationOptions} message ConversationOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chart = null; + object.analysis = null; + } + if (message.chart != null && message.hasOwnProperty("chart")) + object.chart = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.toObject(message.chart, options); + if (message.analysis != null && message.hasOwnProperty("analysis")) + object.analysis = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.toObject(message.analysis, options); + return object; + }; + + /** + * Converts this ConversationOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @instance + * @returns {Object.} JSON object + */ + ConversationOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ConversationOptions"; + }; + + return ConversationOptions; + })(); + + v1alpha.ChartOptions = (function() { + + /** + * Properties of a ChartOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IChartOptions + * @property {google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions|null} [image] ChartOptions image + */ + + /** + * Constructs a new ChartOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ChartOptions. + * @implements IChartOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IChartOptions=} [properties] Properties to set + */ + function ChartOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartOptions image. + * @member {google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions|null|undefined} image + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @instance + */ + ChartOptions.prototype.image = null; + + /** + * Creates a new ChartOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions} ChartOptions instance + */ + ChartOptions.create = function create(properties) { + return new ChartOptions(properties); + }; + + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.image = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.verify(message.image); + if (error) + return "image." + error; + } + return null; + }; + + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions} ChartOptions + */ + ChartOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions(); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChartOptions.image: object expected"); + message.image = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.fromObject(object.image); + } + return message; + }; + + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions} message ChartOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.image = null; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.toObject(message.image, options); + return object; + }; + + /** + * Converts this ChartOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @instance + * @returns {Object.} JSON object + */ + ChartOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChartOptions"; + }; + + ChartOptions.ImageOptions = (function() { + + /** + * Properties of an ImageOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @interface IImageOptions + * @property {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage|null} [noImage] ImageOptions noImage + * @property {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions|null} [svg] ImageOptions svg + */ + + /** + * Constructs a new ImageOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions + * @classdesc Represents an ImageOptions. + * @implements IImageOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions=} [properties] Properties to set + */ + function ImageOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageOptions noImage. + * @member {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage|null|undefined} noImage + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @instance + */ + ImageOptions.prototype.noImage = null; + + /** + * ImageOptions svg. + * @member {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions|null|undefined} svg + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @instance + */ + ImageOptions.prototype.svg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImageOptions kind. + * @member {"noImage"|"svg"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @instance + */ + Object.defineProperty(ImageOptions.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["noImage", "svg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions} ImageOptions instance + */ + ImageOptions.create = function create(properties) { + return new ImageOptions(properties); + }; + + /** + * Encodes the specified ImageOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions} message ImageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.noImage != null && Object.hasOwnProperty.call(message, "noImage")) + $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.encode(message.noImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.svg != null && Object.hasOwnProperty.call(message, "svg")) + $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.encode(message.svg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.IImageOptions} message ImageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions} ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.noImage = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.svg = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions} ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.noImage != null && message.hasOwnProperty("noImage")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.verify(message.noImage); + if (error) + return "noImage." + error; + } + } + if (message.svg != null && message.hasOwnProperty("svg")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.verify(message.svg); + if (error) + return "svg." + error; + } + } + return null; + }; + + /** + * Creates an ImageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions} ImageOptions + */ + ImageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions(); + if (object.noImage != null) { + if (typeof object.noImage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.noImage: object expected"); + message.noImage = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.fromObject(object.noImage); + } + if (object.svg != null) { + if (typeof object.svg !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.svg: object expected"); + message.svg = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.fromObject(object.svg); + } + return message; + }; + + /** + * Creates a plain object from an ImageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions} message ImageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.noImage != null && message.hasOwnProperty("noImage")) { + object.noImage = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.toObject(message.noImage, options); + if (options.oneofs) + object.kind = "noImage"; + } + if (message.svg != null && message.hasOwnProperty("svg")) { + object.svg = $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.toObject(message.svg, options); + if (options.oneofs) + object.kind = "svg"; + } + return object; + }; + + /** + * Converts this ImageOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @instance + * @returns {Object.} JSON object + */ + ImageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions"; + }; + + ImageOptions.NoImage = (function() { + + /** + * Properties of a NoImage. + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @interface INoImage + */ + + /** + * Constructs a new NoImage. + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @classdesc Represents a NoImage. + * @implements INoImage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage=} [properties] Properties to set + */ + function NoImage(properties) { + if (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 NoImage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage} NoImage instance + */ + NoImage.create = function create(properties) { + return new NoImage(properties); + }; + + /** + * Encodes the specified NoImage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage} message NoImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoImage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified NoImage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.INoImage} message NoImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoImage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NoImage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage} NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoImage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NoImage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage} NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoImage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NoImage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NoImage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a NoImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage} NoImage + */ + NoImage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage) + return object; + return new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage(); + }; + + /** + * Creates a plain object from a NoImage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage} message NoImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NoImage.toObject = function toObject() { + return {}; + }; + + /** + * Converts this NoImage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @instance + * @returns {Object.} JSON object + */ + NoImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NoImage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NoImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.NoImage"; + }; + + return NoImage; + })(); + + ImageOptions.SvgOptions = (function() { + + /** + * Properties of a SvgOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @interface ISvgOptions + */ + + /** + * Constructs a new SvgOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions + * @classdesc Represents a SvgOptions. + * @implements ISvgOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions=} [properties] Properties to set + */ + function SvgOptions(properties) { + if (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 SvgOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions} SvgOptions instance + */ + SvgOptions.create = function create(properties) { + return new SvgOptions(properties); + }; + + /** + * Encodes the specified SvgOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions} message SvgOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SvgOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SvgOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.ISvgOptions} message SvgOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SvgOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SvgOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions} SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SvgOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SvgOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions} SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SvgOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SvgOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SvgOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SvgOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions} SvgOptions + */ + SvgOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions) + return object; + return new $root.google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions(); + }; + + /** + * Creates a plain object from a SvgOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions} message SvgOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SvgOptions.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SvgOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @instance + * @returns {Object.} JSON object + */ + SvgOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SvgOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SvgOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChartOptions.ImageOptions.SvgOptions"; + }; + + return SvgOptions; + })(); + + return ImageOptions; + })(); + + return ChartOptions; + })(); + + v1alpha.AnalysisOptions = (function() { + + /** + * Properties of an AnalysisOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IAnalysisOptions + * @property {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython|null} [python] AnalysisOptions python + */ + + /** + * Constructs a new AnalysisOptions. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an AnalysisOptions. + * @implements IAnalysisOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions=} [properties] Properties to set + */ + function AnalysisOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisOptions python. + * @member {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython|null|undefined} python + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @instance + */ + AnalysisOptions.prototype.python = null; + + /** + * Creates a new AnalysisOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions} AnalysisOptions instance + */ + AnalysisOptions.create = function create(properties) { + return new AnalysisOptions(properties); + }; + + /** + * Encodes the specified AnalysisOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions} message AnalysisOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.python != null && Object.hasOwnProperty.call(message, "python")) + $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.encode(message.python, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalysisOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisOptions} message AnalysisOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions} AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.python = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions} AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.python != null && message.hasOwnProperty("python")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.verify(message.python); + if (error) + return "python." + error; + } + return null; + }; + + /** + * Creates an AnalysisOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions} AnalysisOptions + */ + AnalysisOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions(); + if (object.python != null) { + if (typeof object.python !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.python: object expected"); + message.python = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.fromObject(object.python); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions} message AnalysisOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.python = null; + if (message.python != null && message.hasOwnProperty("python")) + object.python = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.toObject(message.python, options); + return object; + }; + + /** + * Converts this AnalysisOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @instance + * @returns {Object.} JSON object + */ + AnalysisOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.AnalysisOptions"; + }; + + AnalysisOptions.Python = (function() { + + /** + * Properties of a Python. + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @interface IPython + * @property {boolean|null} [enabled] Python enabled + */ + + /** + * Constructs a new Python. + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions + * @classdesc Represents a Python. + * @implements IPython + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython=} [properties] Properties to set + */ + function Python(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Python enabled. + * @member {boolean} enabled + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @instance + */ + Python.prototype.enabled = false; + + /** + * Creates a new Python instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python} Python instance + */ + Python.create = function create(properties) { + return new Python(properties); + }; + + /** + * Encodes the specified Python message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython} message Python message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Python.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); + return writer; + }; + + /** + * Encodes the specified Python message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.IPython} message Python message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Python.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Python message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python} Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Python.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Python message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python} Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Python.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Python message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Python.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a Python message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python} Python + */ + Python.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a Python message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python} message Python + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Python.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this Python to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @instance + * @returns {Object.} JSON object + */ + Python.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Python + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Python.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.AnalysisOptions.Python"; + }; + + return Python; + })(); + + return AnalysisOptions; + })(); + + /** + * DataFilterType enum. + * @name google.cloud.geminidataanalytics.v1alpha.DataFilterType + * @enum {number} + * @property {number} DATA_FILTER_TYPE_UNSPECIFIED=0 DATA_FILTER_TYPE_UNSPECIFIED value + * @property {number} ALWAYS_FILTER=1 ALWAYS_FILTER value + */ + v1alpha.DataFilterType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FILTER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALWAYS_FILTER"] = 1; + return values; + })(); + + v1alpha.DatasourceReferences = (function() { + + /** + * Properties of a DatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDatasourceReferences + * @property {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences|null} [bq] DatasourceReferences bq + * @property {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences|null} [studio] DatasourceReferences studio + * @property {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences|null} [looker] DatasourceReferences looker + */ + + /** + * Constructs a new DatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DatasourceReferences. + * @implements IDatasourceReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences=} [properties] Properties to set + */ + function DatasourceReferences(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatasourceReferences bq. + * @member {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences|null|undefined} bq + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @instance + */ + DatasourceReferences.prototype.bq = null; + + /** + * DatasourceReferences studio. + * @member {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences|null|undefined} studio + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @instance + */ + DatasourceReferences.prototype.studio = null; + + /** + * DatasourceReferences looker. + * @member {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences|null|undefined} looker + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @instance + */ + DatasourceReferences.prototype.looker = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatasourceReferences references. + * @member {"bq"|"studio"|"looker"|undefined} references + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @instance + */ + Object.defineProperty(DatasourceReferences.prototype, "references", { + get: $util.oneOfGetter($oneOfFields = ["bq", "studio", "looker"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatasourceReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DatasourceReferences} DatasourceReferences instance + */ + DatasourceReferences.create = function create(properties) { + return new DatasourceReferences(properties); + }; + + /** + * Encodes the specified DatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences} message DatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasourceReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bq != null && Object.hasOwnProperty.call(message, "bq")) + $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.encode(message.bq, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.studio != null && Object.hasOwnProperty.call(message, "studio")) + $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.encode(message.studio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.looker != null && Object.hasOwnProperty.call(message, "looker")) + $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.encode(message.looker, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasourceReferences} message DatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasourceReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DatasourceReferences} DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasourceReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bq = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.decode(reader, reader.uint32()); + break; + } + case 2: { + message.studio = $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.decode(reader, reader.uint32()); + break; + } + case 3: { + message.looker = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DatasourceReferences} DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasourceReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatasourceReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatasourceReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bq != null && message.hasOwnProperty("bq")) { + properties.references = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.verify(message.bq); + if (error) + return "bq." + error; + } + } + if (message.studio != null && message.hasOwnProperty("studio")) { + if (properties.references === 1) + return "references: multiple values"; + properties.references = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.verify(message.studio); + if (error) + return "studio." + error; + } + } + if (message.looker != null && message.hasOwnProperty("looker")) { + if (properties.references === 1) + return "references: multiple values"; + properties.references = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.verify(message.looker); + if (error) + return "looker." + error; + } + } + return null; + }; + + /** + * Creates a DatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DatasourceReferences} DatasourceReferences + */ + DatasourceReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DatasourceReferences(); + if (object.bq != null) { + if (typeof object.bq !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.bq: object expected"); + message.bq = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.fromObject(object.bq); + } + if (object.studio != null) { + if (typeof object.studio !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.studio: object expected"); + message.studio = $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.fromObject(object.studio); + } + if (object.looker != null) { + if (typeof object.looker !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DatasourceReferences.looker: object expected"); + message.looker = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.fromObject(object.looker); + } + return message; + }; + + /** + * Creates a plain object from a DatasourceReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DatasourceReferences} message DatasourceReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatasourceReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bq != null && message.hasOwnProperty("bq")) { + object.bq = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.toObject(message.bq, options); + if (options.oneofs) + object.references = "bq"; + } + if (message.studio != null && message.hasOwnProperty("studio")) { + object.studio = $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.toObject(message.studio, options); + if (options.oneofs) + object.references = "studio"; + } + if (message.looker != null && message.hasOwnProperty("looker")) { + object.looker = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.toObject(message.looker, options); + if (options.oneofs) + object.references = "looker"; + } + return object; + }; + + /** + * Converts this DatasourceReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @instance + * @returns {Object.} JSON object + */ + DatasourceReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatasourceReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DatasourceReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatasourceReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DatasourceReferences"; + }; + + return DatasourceReferences; + })(); + + v1alpha.BigQueryTableReferences = (function() { + + /** + * Properties of a BigQueryTableReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IBigQueryTableReferences + * @property {Array.|null} [tableReferences] BigQueryTableReferences tableReferences + */ + + /** + * Constructs a new BigQueryTableReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a BigQueryTableReferences. + * @implements IBigQueryTableReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences=} [properties] Properties to set + */ + function BigQueryTableReferences(properties) { + this.tableReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableReferences tableReferences. + * @member {Array.} tableReferences + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @instance + */ + BigQueryTableReferences.prototype.tableReferences = $util.emptyArray; + + /** + * Creates a new BigQueryTableReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences} BigQueryTableReferences instance + */ + BigQueryTableReferences.create = function create(properties) { + return new BigQueryTableReferences(properties); + }; + + /** + * Encodes the specified BigQueryTableReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences} message BigQueryTableReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableReferences != null && message.tableReferences.length) + for (var i = 0; i < message.tableReferences.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.encode(message.tableReferences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryTableReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReferences} message BigQueryTableReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences} BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tableReferences && message.tableReferences.length)) + message.tableReferences = []; + message.tableReferences.push($root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences} BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableReferences != null && message.hasOwnProperty("tableReferences")) { + if (!Array.isArray(message.tableReferences)) + return "tableReferences: array expected"; + for (var i = 0; i < message.tableReferences.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.verify(message.tableReferences[i]); + if (error) + return "tableReferences." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryTableReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences} BigQueryTableReferences + */ + BigQueryTableReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences(); + if (object.tableReferences) { + if (!Array.isArray(object.tableReferences)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.tableReferences: array expected"); + message.tableReferences = []; + for (var i = 0; i < object.tableReferences.length; ++i) { + if (typeof object.tableReferences[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences.tableReferences: object expected"); + message.tableReferences[i] = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.fromObject(object.tableReferences[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences} message BigQueryTableReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tableReferences = []; + if (message.tableReferences && message.tableReferences.length) { + object.tableReferences = []; + for (var j = 0; j < message.tableReferences.length; ++j) + object.tableReferences[j] = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.toObject(message.tableReferences[j], options); + } + return object; + }; + + /** + * Converts this BigQueryTableReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.BigQueryTableReferences"; + }; + + return BigQueryTableReferences; + })(); + + v1alpha.BigQueryTableReference = (function() { + + /** + * Properties of a BigQueryTableReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IBigQueryTableReference + * @property {string|null} [projectId] BigQueryTableReference projectId + * @property {string|null} [datasetId] BigQueryTableReference datasetId + * @property {string|null} [tableId] BigQueryTableReference tableId + * @property {google.cloud.geminidataanalytics.v1alpha.ISchema|null} [schema] BigQueryTableReference schema + */ + + /** + * Constructs a new BigQueryTableReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a BigQueryTableReference. + * @implements IBigQueryTableReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference=} [properties] Properties to set + */ + function BigQueryTableReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableReference projectId. + * @member {string} projectId + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.projectId = ""; + + /** + * BigQueryTableReference datasetId. + * @member {string} datasetId + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.datasetId = ""; + + /** + * BigQueryTableReference tableId. + * @member {string} tableId + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.tableId = ""; + + /** + * BigQueryTableReference schema. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.schema = null; + + /** + * Creates a new BigQueryTableReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference} BigQueryTableReference instance + */ + BigQueryTableReference.create = function create(properties) { + return new BigQueryTableReference(properties); + }; + + /** + * Encodes the specified BigQueryTableReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference} message BigQueryTableReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1alpha.Schema.encode(message.schema, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryTableReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference} message BigQueryTableReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference} BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 3: { + message.datasetId = reader.string(); + break; + } + case 4: { + message.tableId = reader.string(); + break; + } + case 6: { + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference} BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a BigQueryTableReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference} BigQueryTableReference + */ + BigQueryTableReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference} message BigQueryTableReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.datasetId = ""; + object.tableId = ""; + object.schema = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this BigQueryTableReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference"; + }; + + return BigQueryTableReference; + })(); + + v1alpha.StudioDatasourceReferences = (function() { + + /** + * Properties of a StudioDatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IStudioDatasourceReferences + * @property {Array.|null} [studioReferences] StudioDatasourceReferences studioReferences + */ + + /** + * Constructs a new StudioDatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a StudioDatasourceReferences. + * @implements IStudioDatasourceReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences=} [properties] Properties to set + */ + function StudioDatasourceReferences(properties) { + this.studioReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StudioDatasourceReferences studioReferences. + * @member {Array.} studioReferences + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @instance + */ + StudioDatasourceReferences.prototype.studioReferences = $util.emptyArray; + + /** + * Creates a new StudioDatasourceReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences} StudioDatasourceReferences instance + */ + StudioDatasourceReferences.create = function create(properties) { + return new StudioDatasourceReferences(properties); + }; + + /** + * Encodes the specified StudioDatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences} message StudioDatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.studioReferences != null && message.studioReferences.length) + for (var i = 0; i < message.studioReferences.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.encode(message.studioReferences[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StudioDatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReferences} message StudioDatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences} StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.studioReferences && message.studioReferences.length)) + message.studioReferences = []; + message.studioReferences.push($root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences} StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StudioDatasourceReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StudioDatasourceReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.studioReferences != null && message.hasOwnProperty("studioReferences")) { + if (!Array.isArray(message.studioReferences)) + return "studioReferences: array expected"; + for (var i = 0; i < message.studioReferences.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.verify(message.studioReferences[i]); + if (error) + return "studioReferences." + error; + } + } + return null; + }; + + /** + * Creates a StudioDatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences} StudioDatasourceReferences + */ + StudioDatasourceReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences(); + if (object.studioReferences) { + if (!Array.isArray(object.studioReferences)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.studioReferences: array expected"); + message.studioReferences = []; + for (var i = 0; i < object.studioReferences.length; ++i) { + if (typeof object.studioReferences[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences.studioReferences: object expected"); + message.studioReferences[i] = $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.fromObject(object.studioReferences[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a StudioDatasourceReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences} message StudioDatasourceReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StudioDatasourceReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.studioReferences = []; + if (message.studioReferences && message.studioReferences.length) { + object.studioReferences = []; + for (var j = 0; j < message.studioReferences.length; ++j) + object.studioReferences[j] = $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.toObject(message.studioReferences[j], options); + } + return object; + }; + + /** + * Converts this StudioDatasourceReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @instance + * @returns {Object.} JSON object + */ + StudioDatasourceReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StudioDatasourceReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StudioDatasourceReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReferences"; + }; + + return StudioDatasourceReferences; + })(); + + v1alpha.StudioDatasourceReference = (function() { + + /** + * Properties of a StudioDatasourceReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IStudioDatasourceReference + * @property {string|null} [datasourceId] StudioDatasourceReference datasourceId + */ + + /** + * Constructs a new StudioDatasourceReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a StudioDatasourceReference. + * @implements IStudioDatasourceReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference=} [properties] Properties to set + */ + function StudioDatasourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StudioDatasourceReference datasourceId. + * @member {string} datasourceId + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @instance + */ + StudioDatasourceReference.prototype.datasourceId = ""; + + /** + * Creates a new StudioDatasourceReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference} StudioDatasourceReference instance + */ + StudioDatasourceReference.create = function create(properties) { + return new StudioDatasourceReference(properties); + }; + + /** + * Encodes the specified StudioDatasourceReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference} message StudioDatasourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasourceId != null && Object.hasOwnProperty.call(message, "datasourceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasourceId); + return writer; + }; + + /** + * Encodes the specified StudioDatasourceReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStudioDatasourceReference} message StudioDatasourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference} StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.datasourceId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference} StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StudioDatasourceReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StudioDatasourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasourceId != null && message.hasOwnProperty("datasourceId")) + if (!$util.isString(message.datasourceId)) + return "datasourceId: string expected"; + return null; + }; + + /** + * Creates a StudioDatasourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference} StudioDatasourceReference + */ + StudioDatasourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference(); + if (object.datasourceId != null) + message.datasourceId = String(object.datasourceId); + return message; + }; + + /** + * Creates a plain object from a StudioDatasourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference} message StudioDatasourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StudioDatasourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.datasourceId = ""; + if (message.datasourceId != null && message.hasOwnProperty("datasourceId")) + object.datasourceId = message.datasourceId; + return object; + }; + + /** + * Converts this StudioDatasourceReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @instance + * @returns {Object.} JSON object + */ + StudioDatasourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StudioDatasourceReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StudioDatasourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.StudioDatasourceReference"; + }; + + return StudioDatasourceReference; + })(); + + v1alpha.LookerExploreReferences = (function() { + + /** + * Properties of a LookerExploreReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ILookerExploreReferences + * @property {Array.|null} [exploreReferences] LookerExploreReferences exploreReferences + * @property {google.cloud.geminidataanalytics.v1alpha.ICredentials|null} [credentials] LookerExploreReferences credentials + */ + + /** + * Constructs a new LookerExploreReferences. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a LookerExploreReferences. + * @implements ILookerExploreReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences=} [properties] Properties to set + */ + function LookerExploreReferences(properties) { + this.exploreReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerExploreReferences exploreReferences. + * @member {Array.} exploreReferences + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @instance + */ + LookerExploreReferences.prototype.exploreReferences = $util.emptyArray; + + /** + * LookerExploreReferences credentials. + * @member {google.cloud.geminidataanalytics.v1alpha.ICredentials|null|undefined} credentials + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @instance + */ + LookerExploreReferences.prototype.credentials = null; + + /** + * Creates a new LookerExploreReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences} LookerExploreReferences instance + */ + LookerExploreReferences.create = function create(properties) { + return new LookerExploreReferences(properties); + }; + + /** + * Encodes the specified LookerExploreReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences} message LookerExploreReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exploreReferences != null && message.exploreReferences.length) + for (var i = 0; i < message.exploreReferences.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.encode(message.exploreReferences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.credentials != null && Object.hasOwnProperty.call(message, "credentials")) + $root.google.cloud.geminidataanalytics.v1alpha.Credentials.encode(message.credentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LookerExploreReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReferences} message LookerExploreReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences} LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.exploreReferences && message.exploreReferences.length)) + message.exploreReferences = []; + message.exploreReferences.push($root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.decode(reader, reader.uint32())); + break; + } + case 2: { + message.credentials = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences} LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerExploreReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerExploreReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exploreReferences != null && message.hasOwnProperty("exploreReferences")) { + if (!Array.isArray(message.exploreReferences)) + return "exploreReferences: array expected"; + for (var i = 0; i < message.exploreReferences.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.verify(message.exploreReferences[i]); + if (error) + return "exploreReferences." + error; + } + } + if (message.credentials != null && message.hasOwnProperty("credentials")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.verify(message.credentials); + if (error) + return "credentials." + error; + } + return null; + }; + + /** + * Creates a LookerExploreReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences} LookerExploreReferences + */ + LookerExploreReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences(); + if (object.exploreReferences) { + if (!Array.isArray(object.exploreReferences)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.exploreReferences: array expected"); + message.exploreReferences = []; + for (var i = 0; i < object.exploreReferences.length; ++i) { + if (typeof object.exploreReferences[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.exploreReferences: object expected"); + message.exploreReferences[i] = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.fromObject(object.exploreReferences[i]); + } + } + if (object.credentials != null) { + if (typeof object.credentials !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences.credentials: object expected"); + message.credentials = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.fromObject(object.credentials); + } + return message; + }; + + /** + * Creates a plain object from a LookerExploreReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences} message LookerExploreReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerExploreReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exploreReferences = []; + if (options.defaults) + object.credentials = null; + if (message.exploreReferences && message.exploreReferences.length) { + object.exploreReferences = []; + for (var j = 0; j < message.exploreReferences.length; ++j) + object.exploreReferences[j] = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.toObject(message.exploreReferences[j], options); + } + if (message.credentials != null && message.hasOwnProperty("credentials")) + object.credentials = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.toObject(message.credentials, options); + return object; + }; + + /** + * Converts this LookerExploreReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @instance + * @returns {Object.} JSON object + */ + LookerExploreReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerExploreReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerExploreReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.LookerExploreReferences"; + }; + + return LookerExploreReferences; + })(); + + v1alpha.LookerExploreReference = (function() { + + /** + * Properties of a LookerExploreReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ILookerExploreReference + * @property {string|null} [lookerInstanceUri] LookerExploreReference lookerInstanceUri + * @property {google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo|null} [privateLookerInstanceInfo] LookerExploreReference privateLookerInstanceInfo + * @property {string|null} [lookmlModel] LookerExploreReference lookmlModel + * @property {string|null} [explore] LookerExploreReference explore + * @property {google.cloud.geminidataanalytics.v1alpha.ISchema|null} [schema] LookerExploreReference schema + */ + + /** + * Constructs a new LookerExploreReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a LookerExploreReference. + * @implements ILookerExploreReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference=} [properties] Properties to set + */ + function LookerExploreReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerExploreReference lookerInstanceUri. + * @member {string|null|undefined} lookerInstanceUri + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.lookerInstanceUri = null; + + /** + * LookerExploreReference privateLookerInstanceInfo. + * @member {google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo|null|undefined} privateLookerInstanceInfo + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.privateLookerInstanceInfo = null; + + /** + * LookerExploreReference lookmlModel. + * @member {string} lookmlModel + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.lookmlModel = ""; + + /** + * LookerExploreReference explore. + * @member {string} explore + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.explore = ""; + + /** + * LookerExploreReference schema. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.schema = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LookerExploreReference instance. + * @member {"lookerInstanceUri"|"privateLookerInstanceInfo"|undefined} instance + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @instance + */ + Object.defineProperty(LookerExploreReference.prototype, "instance", { + get: $util.oneOfGetter($oneOfFields = ["lookerInstanceUri", "privateLookerInstanceInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LookerExploreReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReference} LookerExploreReference instance + */ + LookerExploreReference.create = function create(properties) { + return new LookerExploreReference(properties); + }; + + /** + * Encodes the specified LookerExploreReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference} message LookerExploreReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lookmlModel != null && Object.hasOwnProperty.call(message, "lookmlModel")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.lookmlModel); + if (message.explore != null && Object.hasOwnProperty.call(message, "explore")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.explore); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1alpha.Schema.encode(message.schema, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lookerInstanceUri != null && Object.hasOwnProperty.call(message, "lookerInstanceUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.lookerInstanceUri); + if (message.privateLookerInstanceInfo != null && Object.hasOwnProperty.call(message, "privateLookerInstanceInfo")) + $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.encode(message.privateLookerInstanceInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LookerExploreReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference} message LookerExploreReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReference} LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 9: { + message.lookerInstanceUri = reader.string(); + break; + } + case 10: { + message.privateLookerInstanceInfo = $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lookmlModel = reader.string(); + break; + } + case 5: { + message.explore = reader.string(); + break; + } + case 8: { + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReference} LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerExploreReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerExploreReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lookerInstanceUri != null && message.hasOwnProperty("lookerInstanceUri")) { + properties.instance = 1; + if (!$util.isString(message.lookerInstanceUri)) + return "lookerInstanceUri: string expected"; + } + if (message.privateLookerInstanceInfo != null && message.hasOwnProperty("privateLookerInstanceInfo")) { + if (properties.instance === 1) + return "instance: multiple values"; + properties.instance = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.verify(message.privateLookerInstanceInfo); + if (error) + return "privateLookerInstanceInfo." + error; + } + } + if (message.lookmlModel != null && message.hasOwnProperty("lookmlModel")) + if (!$util.isString(message.lookmlModel)) + return "lookmlModel: string expected"; + if (message.explore != null && message.hasOwnProperty("explore")) + if (!$util.isString(message.explore)) + return "explore: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a LookerExploreReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerExploreReference} LookerExploreReference + */ + LookerExploreReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference(); + if (object.lookerInstanceUri != null) + message.lookerInstanceUri = String(object.lookerInstanceUri); + if (object.privateLookerInstanceInfo != null) { + if (typeof object.privateLookerInstanceInfo !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.privateLookerInstanceInfo: object expected"); + message.privateLookerInstanceInfo = $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.fromObject(object.privateLookerInstanceInfo); + } + if (object.lookmlModel != null) + message.lookmlModel = String(object.lookmlModel); + if (object.explore != null) + message.explore = String(object.explore); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a LookerExploreReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.LookerExploreReference} message LookerExploreReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerExploreReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lookmlModel = ""; + object.explore = ""; + object.schema = null; + } + if (message.lookmlModel != null && message.hasOwnProperty("lookmlModel")) + object.lookmlModel = message.lookmlModel; + if (message.explore != null && message.hasOwnProperty("explore")) + object.explore = message.explore; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.toObject(message.schema, options); + if (message.lookerInstanceUri != null && message.hasOwnProperty("lookerInstanceUri")) { + object.lookerInstanceUri = message.lookerInstanceUri; + if (options.oneofs) + object.instance = "lookerInstanceUri"; + } + if (message.privateLookerInstanceInfo != null && message.hasOwnProperty("privateLookerInstanceInfo")) { + object.privateLookerInstanceInfo = $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.toObject(message.privateLookerInstanceInfo, options); + if (options.oneofs) + object.instance = "privateLookerInstanceInfo"; + } + return object; + }; + + /** + * Converts this LookerExploreReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @instance + * @returns {Object.} JSON object + */ + LookerExploreReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerExploreReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerExploreReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerExploreReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.LookerExploreReference"; + }; + + return LookerExploreReference; + })(); + + v1alpha.PrivateLookerInstanceInfo = (function() { + + /** + * Properties of a PrivateLookerInstanceInfo. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IPrivateLookerInstanceInfo + * @property {string|null} [lookerInstanceId] PrivateLookerInstanceInfo lookerInstanceId + * @property {string|null} [serviceDirectoryName] PrivateLookerInstanceInfo serviceDirectoryName + */ + + /** + * Constructs a new PrivateLookerInstanceInfo. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a PrivateLookerInstanceInfo. + * @implements IPrivateLookerInstanceInfo + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo=} [properties] Properties to set + */ + function PrivateLookerInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateLookerInstanceInfo lookerInstanceId. + * @member {string} lookerInstanceId + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @instance + */ + PrivateLookerInstanceInfo.prototype.lookerInstanceId = ""; + + /** + * PrivateLookerInstanceInfo serviceDirectoryName. + * @member {string} serviceDirectoryName + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @instance + */ + PrivateLookerInstanceInfo.prototype.serviceDirectoryName = ""; + + /** + * Creates a new PrivateLookerInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo instance + */ + PrivateLookerInstanceInfo.create = function create(properties) { + return new PrivateLookerInstanceInfo(properties); + }; + + /** + * Encodes the specified PrivateLookerInstanceInfo message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo} message PrivateLookerInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateLookerInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lookerInstanceId != null && Object.hasOwnProperty.call(message, "lookerInstanceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lookerInstanceId); + if (message.serviceDirectoryName != null && Object.hasOwnProperty.call(message, "serviceDirectoryName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceDirectoryName); + return writer; + }; + + /** + * Encodes the specified PrivateLookerInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IPrivateLookerInstanceInfo} message PrivateLookerInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateLookerInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateLookerInstanceInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lookerInstanceId = reader.string(); + break; + } + case 2: { + message.serviceDirectoryName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateLookerInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateLookerInstanceInfo message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateLookerInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lookerInstanceId != null && message.hasOwnProperty("lookerInstanceId")) + if (!$util.isString(message.lookerInstanceId)) + return "lookerInstanceId: string expected"; + if (message.serviceDirectoryName != null && message.hasOwnProperty("serviceDirectoryName")) + if (!$util.isString(message.serviceDirectoryName)) + return "serviceDirectoryName: string expected"; + return null; + }; + + /** + * Creates a PrivateLookerInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo + */ + PrivateLookerInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo(); + if (object.lookerInstanceId != null) + message.lookerInstanceId = String(object.lookerInstanceId); + if (object.serviceDirectoryName != null) + message.serviceDirectoryName = String(object.serviceDirectoryName); + return message; + }; + + /** + * Creates a plain object from a PrivateLookerInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo} message PrivateLookerInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateLookerInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lookerInstanceId = ""; + object.serviceDirectoryName = ""; + } + if (message.lookerInstanceId != null && message.hasOwnProperty("lookerInstanceId")) + object.lookerInstanceId = message.lookerInstanceId; + if (message.serviceDirectoryName != null && message.hasOwnProperty("serviceDirectoryName")) + object.serviceDirectoryName = message.serviceDirectoryName; + return object; + }; + + /** + * Converts this PrivateLookerInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + PrivateLookerInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateLookerInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateLookerInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.PrivateLookerInstanceInfo"; + }; + + return PrivateLookerInstanceInfo; + })(); + + v1alpha.Datasource = (function() { + + /** + * Properties of a Datasource. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDatasource + * @property {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null} [bigqueryTableReference] Datasource bigqueryTableReference + * @property {string|null} [studioDatasourceId] Datasource studioDatasourceId + * @property {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference|null} [lookerExploreReference] Datasource lookerExploreReference + * @property {google.cloud.geminidataanalytics.v1alpha.ISchema|null} [schema] Datasource schema + */ + + /** + * Constructs a new Datasource. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Datasource. + * @implements IDatasource + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasource=} [properties] Properties to set + */ + function Datasource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Datasource bigqueryTableReference. + * @member {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null|undefined} bigqueryTableReference + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @instance + */ + Datasource.prototype.bigqueryTableReference = null; + + /** + * Datasource studioDatasourceId. + * @member {string|null|undefined} studioDatasourceId + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @instance + */ + Datasource.prototype.studioDatasourceId = null; + + /** + * Datasource lookerExploreReference. + * @member {google.cloud.geminidataanalytics.v1alpha.ILookerExploreReference|null|undefined} lookerExploreReference + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @instance + */ + Datasource.prototype.lookerExploreReference = null; + + /** + * Datasource schema. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @instance + */ + Datasource.prototype.schema = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Datasource reference. + * @member {"bigqueryTableReference"|"studioDatasourceId"|"lookerExploreReference"|undefined} reference + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @instance + */ + Object.defineProperty(Datasource.prototype, "reference", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryTableReference", "studioDatasourceId", "lookerExploreReference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Datasource instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasource=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Datasource} Datasource instance + */ + Datasource.create = function create(properties) { + return new Datasource(properties); + }; + + /** + * Encodes the specified Datasource message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Datasource.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasource} message Datasource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Datasource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryTableReference != null && Object.hasOwnProperty.call(message, "bigqueryTableReference")) + $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.encode(message.bigqueryTableReference, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.studioDatasourceId != null && Object.hasOwnProperty.call(message, "studioDatasourceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.studioDatasourceId); + if (message.lookerExploreReference != null && Object.hasOwnProperty.call(message, "lookerExploreReference")) + $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.encode(message.lookerExploreReference, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1alpha.Schema.encode(message.schema, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Datasource message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Datasource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDatasource} message Datasource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Datasource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Datasource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Datasource} Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Datasource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Datasource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bigqueryTableReference = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.decode(reader, reader.uint32()); + break; + } + case 2: { + message.studioDatasourceId = reader.string(); + break; + } + case 4: { + message.lookerExploreReference = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.decode(reader, reader.uint32()); + break; + } + case 7: { + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Datasource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Datasource} Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Datasource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Datasource message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Datasource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigqueryTableReference != null && message.hasOwnProperty("bigqueryTableReference")) { + properties.reference = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.verify(message.bigqueryTableReference); + if (error) + return "bigqueryTableReference." + error; + } + } + if (message.studioDatasourceId != null && message.hasOwnProperty("studioDatasourceId")) { + if (properties.reference === 1) + return "reference: multiple values"; + properties.reference = 1; + if (!$util.isString(message.studioDatasourceId)) + return "studioDatasourceId: string expected"; + } + if (message.lookerExploreReference != null && message.hasOwnProperty("lookerExploreReference")) { + if (properties.reference === 1) + return "reference: multiple values"; + properties.reference = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.verify(message.lookerExploreReference); + if (error) + return "lookerExploreReference." + error; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a Datasource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Datasource} Datasource + */ + Datasource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Datasource) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Datasource(); + if (object.bigqueryTableReference != null) { + if (typeof object.bigqueryTableReference !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Datasource.bigqueryTableReference: object expected"); + message.bigqueryTableReference = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.fromObject(object.bigqueryTableReference); + } + if (object.studioDatasourceId != null) + message.studioDatasourceId = String(object.studioDatasourceId); + if (object.lookerExploreReference != null) { + if (typeof object.lookerExploreReference !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Datasource.lookerExploreReference: object expected"); + message.lookerExploreReference = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.fromObject(object.lookerExploreReference); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Datasource.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a Datasource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Datasource} message Datasource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Datasource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.schema = null; + if (message.bigqueryTableReference != null && message.hasOwnProperty("bigqueryTableReference")) { + object.bigqueryTableReference = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.toObject(message.bigqueryTableReference, options); + if (options.oneofs) + object.reference = "bigqueryTableReference"; + } + if (message.studioDatasourceId != null && message.hasOwnProperty("studioDatasourceId")) { + object.studioDatasourceId = message.studioDatasourceId; + if (options.oneofs) + object.reference = "studioDatasourceId"; + } + if (message.lookerExploreReference != null && message.hasOwnProperty("lookerExploreReference")) { + object.lookerExploreReference = $root.google.cloud.geminidataanalytics.v1alpha.LookerExploreReference.toObject(message.lookerExploreReference, options); + if (options.oneofs) + object.reference = "lookerExploreReference"; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this Datasource to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @instance + * @returns {Object.} JSON object + */ + Datasource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Datasource + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Datasource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Datasource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Datasource"; + }; + + return Datasource; + })(); + + v1alpha.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ISchema + * @property {Array.|null} [fields] Schema fields + * @property {string|null} [description] Schema description + * @property {Array.|null} [synonyms] Schema synonyms + * @property {Array.|null} [tags] Schema tags + * @property {string|null} [displayName] Schema displayName + * @property {Array.|null} [filters] Schema filters + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.fields = []; + this.synonyms = []; + this.tags = []; + this.filters = []; + if (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 fields. + * @member {Array.} fields + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @instance + */ + Schema.prototype.fields = $util.emptyArray; + + /** + * Schema description. + * @member {string} description + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @instance + */ + Schema.prototype.description = ""; + + /** + * Schema synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @instance + */ + Schema.prototype.synonyms = $util.emptyArray; + + /** + * Schema tags. + * @member {Array.} tags + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @instance + */ + Schema.prototype.tags = $util.emptyArray; + + /** + * Schema displayName. + * @member {string} displayName + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @instance + */ + Schema.prototype.displayName = ""; + + /** + * Schema filters. + * @member {Array.} filters + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @instance + */ + Schema.prototype.filters = $util.emptyArray; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchema=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.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.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.synonyms != null && message.synonyms.length) + for (var i = 0; i < message.synonyms.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.synonyms[i]); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tags[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.DataFilter.encode(message.filters[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.geminidataanalytics.v1alpha.Field.decode(reader, reader.uint32())); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); + break; + } + case 4: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.cloud.geminidataanalytics.v1alpha.DataFilter.decode(reader, reader.uint32())); + 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.geminidataanalytics.v1alpha.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.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.geminidataanalytics.v1alpha.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.synonyms != null && message.hasOwnProperty("synonyms")) { + if (!Array.isArray(message.synonyms)) + return "synonyms: array expected"; + for (var i = 0; i < message.synonyms.length; ++i) + if (!$util.isString(message.synonyms[i])) + return "synonyms: string[] expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataFilter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Schema) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Schema(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.Schema.fields: object expected"); + message.fields[i] = $root.google.cloud.geminidataanalytics.v1alpha.Field.fromObject(object.fields[i]); + } + } + if (object.description != null) + message.description = String(object.description); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Schema.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[i]); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Schema.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Schema.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Schema.filters: object expected"); + message.filters[i] = $root.google.cloud.geminidataanalytics.v1alpha.DataFilter.fromObject(object.filters[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.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.synonyms = []; + object.tags = []; + object.filters = []; + } + if (options.defaults) { + object.description = ""; + object.displayName = ""; + } + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.geminidataanalytics.v1alpha.Field.toObject(message.fields[j], options); + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.synonyms && message.synonyms.length) { + object.synonyms = []; + for (var j = 0; j < message.synonyms.length; ++j) + object.synonyms[j] = message.synonyms[j]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.cloud.geminidataanalytics.v1alpha.DataFilter.toObject(message.filters[j], options); + } + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schema + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Schema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Schema"; + }; + + return Schema; + })(); + + v1alpha.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IField + * @property {string|null} [name] Field name + * @property {string|null} [type] Field type + * @property {string|null} [description] Field description + * @property {string|null} [mode] Field mode + * @property {Array.|null} [synonyms] Field synonyms + * @property {Array.|null} [tags] Field tags + * @property {string|null} [displayName] Field displayName + * @property {Array.|null} [subfields] Field subfields + * @property {string|null} [category] Field category + * @property {string|null} [valueFormat] Field valueFormat + */ + + /** + * Constructs a new Field. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IField=} [properties] Properties to set + */ + function Field(properties) { + this.synonyms = []; + this.tags = []; + this.subfields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Field name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.name = ""; + + /** + * Field type. + * @member {string} type + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.type = ""; + + /** + * Field description. + * @member {string} description + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.description = ""; + + /** + * Field mode. + * @member {string} mode + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.mode = ""; + + /** + * Field synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.synonyms = $util.emptyArray; + + /** + * Field tags. + * @member {Array.} tags + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.tags = $util.emptyArray; + + /** + * Field displayName. + * @member {string} displayName + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.displayName = ""; + + /** + * Field subfields. + * @member {Array.} subfields + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.subfields = $util.emptyArray; + + /** + * Field category. + * @member {string} category + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.category = ""; + + /** + * Field valueFormat. + * @member {string} valueFormat + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + */ + Field.prototype.valueFormat = ""; + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IField=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Field.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer) { + 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 2 =*/18).string(message.type); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mode); + if (message.synonyms != null && message.synonyms.length) + for (var i = 0; i < message.synonyms.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.synonyms[i]); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tags[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.subfields != null && message.subfields.length) + for (var i = 0; i < message.subfields.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.Field.encode(message.subfields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.category); + if (message.valueFormat != null && Object.hasOwnProperty.call(message, "valueFormat")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.valueFormat); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.mode = reader.string(); + break; + } + case 6: { + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); + break; + } + case 7: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 9: { + if (!(message.subfields && message.subfields.length)) + message.subfields = []; + message.subfields.push($root.google.cloud.geminidataanalytics.v1alpha.Field.decode(reader, reader.uint32())); + break; + } + case 10: { + message.category = reader.string(); + break; + } + case 11: { + message.valueFormat = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message) { + if (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")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + if (!$util.isString(message.mode)) + return "mode: string expected"; + if (message.synonyms != null && message.hasOwnProperty("synonyms")) { + if (!Array.isArray(message.synonyms)) + return "synonyms: array expected"; + for (var i = 0; i < message.synonyms.length; ++i) + if (!$util.isString(message.synonyms[i])) + return "synonyms: string[] expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.subfields != null && message.hasOwnProperty("subfields")) { + if (!Array.isArray(message.subfields)) + return "subfields: array expected"; + for (var i = 0; i < message.subfields.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Field.verify(message.subfields[i]); + if (error) + return "subfields." + error; + } + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.valueFormat != null && message.hasOwnProperty("valueFormat")) + if (!$util.isString(message.valueFormat)) + return "valueFormat: string expected"; + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Field) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Field(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.description != null) + message.description = String(object.description); + if (object.mode != null) + message.mode = String(object.mode); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Field.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[i]); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Field.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.subfields) { + if (!Array.isArray(object.subfields)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Field.subfields: array expected"); + message.subfields = []; + for (var i = 0; i < object.subfields.length; ++i) { + if (typeof object.subfields[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Field.subfields: object expected"); + message.subfields[i] = $root.google.cloud.geminidataanalytics.v1alpha.Field.fromObject(object.subfields[i]); + } + } + if (object.category != null) + message.category = String(object.category); + if (object.valueFormat != null) + message.valueFormat = String(object.valueFormat); + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.synonyms = []; + object.tags = []; + object.subfields = []; + } + if (options.defaults) { + object.name = ""; + object.type = ""; + object.description = ""; + object.mode = ""; + object.displayName = ""; + object.category = ""; + object.valueFormat = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = message.mode; + if (message.synonyms && message.synonyms.length) { + object.synonyms = []; + for (var j = 0; j < message.synonyms.length; ++j) + object.synonyms[j] = message.synonyms[j]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.subfields && message.subfields.length) { + object.subfields = []; + for (var j = 0; j < message.subfields.length; ++j) + object.subfields[j] = $root.google.cloud.geminidataanalytics.v1alpha.Field.toObject(message.subfields[j], options); + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.valueFormat != null && message.hasOwnProperty("valueFormat")) + object.valueFormat = message.valueFormat; + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Field"; + }; + + return Field; + })(); + + v1alpha.DataFilter = (function() { + + /** + * Properties of a DataFilter. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDataFilter + * @property {string|null} [field] DataFilter field + * @property {string|null} [value] DataFilter value + * @property {google.cloud.geminidataanalytics.v1alpha.DataFilterType|null} [type] DataFilter type + */ + + /** + * Constructs a new DataFilter. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataFilter. + * @implements IDataFilter + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDataFilter=} [properties] Properties to set + */ + function DataFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataFilter field. + * @member {string} field + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @instance + */ + DataFilter.prototype.field = ""; + + /** + * DataFilter value. + * @member {string} value + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @instance + */ + DataFilter.prototype.value = ""; + + /** + * DataFilter type. + * @member {google.cloud.geminidataanalytics.v1alpha.DataFilterType} type + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @instance + */ + DataFilter.prototype.type = 0; + + /** + * Creates a new DataFilter instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataFilter=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DataFilter} DataFilter instance + */ + DataFilter.create = function create(properties) { + return new DataFilter(properties); + }; + + /** + * Encodes the specified DataFilter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataFilter} message DataFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified DataFilter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataFilter} message DataFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DataFilter} DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DataFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DataFilter} DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataFilter message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a DataFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DataFilter} DataFilter + */ + DataFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DataFilter) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DataFilter(); + if (object.field != null) + message.field = String(object.field); + if (object.value != null) + message.value = String(object.value); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_FILTER_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ALWAYS_FILTER": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DataFilter} message DataFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.value = ""; + object.type = options.enums === String ? "DATA_FILTER_TYPE_UNSPECIFIED" : 0; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.DataFilterType[message.type] === undefined ? message.type : $root.google.cloud.geminidataanalytics.v1alpha.DataFilterType[message.type] : message.type; + return object; + }; + + /** + * Converts this DataFilter to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @instance + * @returns {Object.} JSON object + */ + DataFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataFilter + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DataFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DataFilter"; + }; + + return DataFilter; + })(); + + v1alpha.Credentials = (function() { + + /** + * Properties of a Credentials. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ICredentials + * @property {google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials|null} [oauth] Credentials oauth + */ + + /** + * Constructs a new Credentials. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Credentials. + * @implements ICredentials + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ICredentials=} [properties] Properties to set + */ + function Credentials(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Credentials oauth. + * @member {google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials|null|undefined} oauth + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @instance + */ + Credentials.prototype.oauth = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Credentials kind. + * @member {"oauth"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @instance + */ + Object.defineProperty(Credentials.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["oauth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Credentials instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICredentials=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Credentials} Credentials instance + */ + Credentials.create = function create(properties) { + return new Credentials(properties); + }; + + /** + * Encodes the specified Credentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Credentials.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICredentials} message Credentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Credentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oauth != null && Object.hasOwnProperty.call(message, "oauth")) + $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.encode(message.oauth, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Credentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Credentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICredentials} message Credentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Credentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Credentials message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Credentials} Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Credentials.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Credentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.oauth = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Credentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Credentials} Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Credentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Credentials message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Credentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.oauth != null && message.hasOwnProperty("oauth")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.verify(message.oauth); + if (error) + return "oauth." + error; + } + } + return null; + }; + + /** + * Creates a Credentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Credentials} Credentials + */ + Credentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Credentials) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Credentials(); + if (object.oauth != null) { + if (typeof object.oauth !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Credentials.oauth: object expected"); + message.oauth = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.fromObject(object.oauth); + } + return message; + }; + + /** + * Creates a plain object from a Credentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Credentials} message Credentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Credentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.oauth != null && message.hasOwnProperty("oauth")) { + object.oauth = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.toObject(message.oauth, options); + if (options.oneofs) + object.kind = "oauth"; + } + return object; + }; + + /** + * Converts this Credentials to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @instance + * @returns {Object.} JSON object + */ + Credentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Credentials + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Credentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Credentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Credentials"; + }; + + return Credentials; + })(); + + v1alpha.OAuthCredentials = (function() { + + /** + * Properties of a OAuthCredentials. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IOAuthCredentials + * @property {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased|null} [secret] OAuthCredentials secret + * @property {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased|null} [token] OAuthCredentials token + */ + + /** + * Constructs a new OAuthCredentials. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a OAuthCredentials. + * @implements IOAuthCredentials + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials=} [properties] Properties to set + */ + function OAuthCredentials(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OAuthCredentials secret. + * @member {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased|null|undefined} secret + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @instance + */ + OAuthCredentials.prototype.secret = null; + + /** + * OAuthCredentials token. + * @member {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased|null|undefined} token + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @instance + */ + OAuthCredentials.prototype.token = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OAuthCredentials kind. + * @member {"secret"|"token"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @instance + */ + Object.defineProperty(OAuthCredentials.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["secret", "token"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OAuthCredentials instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials} OAuthCredentials instance + */ + OAuthCredentials.create = function create(properties) { + return new OAuthCredentials(properties); + }; + + /** + * Encodes the specified OAuthCredentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials} message OAuthCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthCredentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secret != null && Object.hasOwnProperty.call(message, "secret")) + $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.encode(message.secret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.encode(message.token, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OAuthCredentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IOAuthCredentials} message OAuthCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthCredentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials} OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthCredentials.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.secret = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.decode(reader, reader.uint32()); + break; + } + case 3: { + message.token = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials} OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthCredentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OAuthCredentials message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OAuthCredentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.secret != null && message.hasOwnProperty("secret")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.verify(message.secret); + if (error) + return "secret." + error; + } + } + if (message.token != null && message.hasOwnProperty("token")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.verify(message.token); + if (error) + return "token." + error; + } + } + return null; + }; + + /** + * Creates a OAuthCredentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials} OAuthCredentials + */ + OAuthCredentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials(); + if (object.secret != null) { + if (typeof object.secret !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.secret: object expected"); + message.secret = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.fromObject(object.secret); + } + if (object.token != null) { + if (typeof object.token !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.token: object expected"); + message.token = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.fromObject(object.token); + } + return message; + }; + + /** + * Creates a plain object from a OAuthCredentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials} message OAuthCredentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OAuthCredentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.secret != null && message.hasOwnProperty("secret")) { + object.secret = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.toObject(message.secret, options); + if (options.oneofs) + object.kind = "secret"; + } + if (message.token != null && message.hasOwnProperty("token")) { + object.token = $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.toObject(message.token, options); + if (options.oneofs) + object.kind = "token"; + } + return object; + }; + + /** + * Converts this OAuthCredentials to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @instance + * @returns {Object.} JSON object + */ + OAuthCredentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OAuthCredentials + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OAuthCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.OAuthCredentials"; + }; + + OAuthCredentials.SecretBased = (function() { + + /** + * Properties of a SecretBased. + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @interface ISecretBased + * @property {string|null} [clientId] SecretBased clientId + * @property {string|null} [clientSecret] SecretBased clientSecret + */ + + /** + * Constructs a new SecretBased. + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @classdesc Represents a SecretBased. + * @implements ISecretBased + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased=} [properties] Properties to set + */ + function SecretBased(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretBased clientId. + * @member {string} clientId + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @instance + */ + SecretBased.prototype.clientId = ""; + + /** + * SecretBased clientSecret. + * @member {string} clientSecret + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @instance + */ + SecretBased.prototype.clientSecret = ""; + + /** + * Creates a new SecretBased instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased} SecretBased instance + */ + SecretBased.create = function create(properties) { + return new SecretBased(properties); + }; + + /** + * Encodes the specified SecretBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased} message SecretBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretBased.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); + if (message.clientSecret != null && Object.hasOwnProperty.call(message, "clientSecret")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientSecret); + return writer; + }; + + /** + * Encodes the specified SecretBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ISecretBased} message SecretBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretBased.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretBased message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased} SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretBased.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.clientId = reader.string(); + break; + } + case 3: { + message.clientSecret = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretBased message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased} SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretBased.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretBased message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretBased.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + if (!$util.isString(message.clientSecret)) + return "clientSecret: string expected"; + return null; + }; + + /** + * Creates a SecretBased message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased} SecretBased + */ + SecretBased.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientSecret != null) + message.clientSecret = String(object.clientSecret); + return message; + }; + + /** + * Creates a plain object from a SecretBased message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased} message SecretBased + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretBased.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientSecret = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + object.clientSecret = message.clientSecret; + return object; + }; + + /** + * Converts this SecretBased to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @instance + * @returns {Object.} JSON object + */ + SecretBased.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretBased + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretBased.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.SecretBased"; + }; + + return SecretBased; + })(); + + OAuthCredentials.TokenBased = (function() { + + /** + * Properties of a TokenBased. + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @interface ITokenBased + * @property {string|null} [accessToken] TokenBased accessToken + */ + + /** + * Constructs a new TokenBased. + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials + * @classdesc Represents a TokenBased. + * @implements ITokenBased + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased=} [properties] Properties to set + */ + function TokenBased(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TokenBased accessToken. + * @member {string} accessToken + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @instance + */ + TokenBased.prototype.accessToken = ""; + + /** + * Creates a new TokenBased instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased} TokenBased instance + */ + TokenBased.create = function create(properties) { + return new TokenBased(properties); + }; + + /** + * Encodes the specified TokenBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased} message TokenBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBased.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accessToken); + return writer; + }; + + /** + * Encodes the specified TokenBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.ITokenBased} message TokenBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBased.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenBased message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased} TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBased.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accessToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenBased message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased} TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBased.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenBased message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenBased.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + if (!$util.isString(message.accessToken)) + return "accessToken: string expected"; + return null; + }; + + /** + * Creates a TokenBased message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased} TokenBased + */ + TokenBased.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased(); + if (object.accessToken != null) + message.accessToken = String(object.accessToken); + return message; + }; + + /** + * Creates a plain object from a TokenBased message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased} message TokenBased + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenBased.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accessToken = ""; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + object.accessToken = message.accessToken; + return object; + }; + + /** + * Converts this TokenBased to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @instance + * @returns {Object.} JSON object + */ + TokenBased.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TokenBased + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TokenBased.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.OAuthCredentials.TokenBased"; + }; + + return TokenBased; + })(); + + return OAuthCredentials; + })(); + + v1alpha.Conversation = (function() { + + /** + * Properties of a Conversation. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IConversation + * @property {string|null} [name] Conversation name + * @property {Array.|null} [agents] Conversation agents + * @property {google.protobuf.ITimestamp|null} [createTime] Conversation createTime + * @property {google.protobuf.ITimestamp|null} [lastUsedTime] Conversation lastUsedTime + * @property {Object.|null} [labels] Conversation labels + */ + + /** + * Constructs a new Conversation. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Conversation. + * @implements IConversation + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IConversation=} [properties] Properties to set + */ + function Conversation(properties) { + this.agents = []; + 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]]; + } + + /** + * Conversation name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @instance + */ + Conversation.prototype.name = ""; + + /** + * Conversation agents. + * @member {Array.} agents + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @instance + */ + Conversation.prototype.agents = $util.emptyArray; + + /** + * Conversation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @instance + */ + Conversation.prototype.createTime = null; + + /** + * Conversation lastUsedTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUsedTime + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @instance + */ + Conversation.prototype.lastUsedTime = null; + + /** + * Conversation labels. + * @member {Object.} labels + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @instance + */ + Conversation.prototype.labels = $util.emptyObject; + + /** + * Creates a new Conversation instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversation=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Conversation} Conversation instance + */ + Conversation.create = function create(properties) { + return new Conversation(properties); + }; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Conversation.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encode = function encode(message, writer) { + 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.agents != null && message.agents.length) + for (var i = 0; i < message.agents.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agents[i]); + 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.lastUsedTime != null && Object.hasOwnProperty.call(message, "lastUsedTime")) + $root.google.protobuf.Timestamp.encode(message.lastUsedTime, writer.uint32(/* id 4, wireType 2 =*/34).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 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Conversation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Conversation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.agents && message.agents.length)) + message.agents = []; + message.agents.push(reader.string()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastUsedTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Conversation message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Conversation.verify = function verify(message) { + if (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.agents != null && message.hasOwnProperty("agents")) { + if (!Array.isArray(message.agents)) + return "agents: array expected"; + for (var i = 0; i < message.agents.length; ++i) + if (!$util.isString(message.agents[i])) + return "agents: 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.lastUsedTime != null && message.hasOwnProperty("lastUsedTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUsedTime); + if (error) + return "lastUsedTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Conversation} Conversation + */ + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Conversation) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Conversation(); + if (object.name != null) + message.name = String(object.name); + if (object.agents) { + if (!Array.isArray(object.agents)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Conversation.agents: array expected"); + message.agents = []; + for (var i = 0; i < object.agents.length; ++i) + message.agents[i] = String(object.agents[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Conversation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUsedTime != null) { + if (typeof object.lastUsedTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Conversation.lastUsedTime: object expected"); + message.lastUsedTime = $root.google.protobuf.Timestamp.fromObject(object.lastUsedTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Conversation.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Conversation} message Conversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Conversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.agents = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.lastUsedTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.agents && message.agents.length) { + object.agents = []; + for (var j = 0; j < message.agents.length; ++j) + object.agents[j] = message.agents[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUsedTime != null && message.hasOwnProperty("lastUsedTime")) + object.lastUsedTime = $root.google.protobuf.Timestamp.toObject(message.lastUsedTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this Conversation to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @instance + * @returns {Object.} JSON object + */ + Conversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Conversation + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Conversation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Conversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Conversation"; + }; + + return Conversation; + })(); + + v1alpha.CreateConversationRequest = (function() { + + /** + * Properties of a CreateConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ICreateConversationRequest + * @property {string|null} [parent] CreateConversationRequest parent + * @property {string|null} [conversationId] CreateConversationRequest conversationId + * @property {google.cloud.geminidataanalytics.v1alpha.IConversation|null} [conversation] CreateConversationRequest conversation + * @property {string|null} [requestId] CreateConversationRequest requestId + */ + + /** + * Constructs a new CreateConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a CreateConversationRequest. + * @implements ICreateConversationRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest=} [properties] Properties to set + */ + function CreateConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConversationRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.parent = ""; + + /** + * CreateConversationRequest conversationId. + * @member {string} conversationId + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversationId = ""; + + /** + * CreateConversationRequest conversation. + * @member {google.cloud.geminidataanalytics.v1alpha.IConversation|null|undefined} conversation + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversation = null; + + /** + * CreateConversationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest} CreateConversationRequest instance + */ + CreateConversationRequest.create = function create(properties) { + return new CreateConversationRequest(properties); + }; + + /** + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationRequest.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.conversationId != null && Object.hasOwnProperty.call(message, "conversationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversationId); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + $root.google.cloud.geminidataanalytics.v1alpha.Conversation.encode(message.conversation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest} CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.conversationId = reader.string(); + break; + } + case 3: { + message.conversation = $root.google.cloud.geminidataanalytics.v1alpha.Conversation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest} CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConversationRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConversationRequest.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.conversationId != null && message.hasOwnProperty("conversationId")) + if (!$util.isString(message.conversationId)) + return "conversationId: string expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Conversation.verify(message.conversation); + if (error) + return "conversation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest} CreateConversationRequest + */ + CreateConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversationId != null) + message.conversationId = String(object.conversationId); + if (object.conversation != null) { + if (typeof object.conversation !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest.conversation: object expected"); + message.conversation = $root.google.cloud.geminidataanalytics.v1alpha.Conversation.fromObject(object.conversation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest} message CreateConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConversationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.conversationId = ""; + object.conversation = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + object.conversationId = message.conversationId; + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = $root.google.cloud.geminidataanalytics.v1alpha.Conversation.toObject(message.conversation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConversationRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest"; + }; + + return CreateConversationRequest; + })(); + + v1alpha.GetConversationRequest = (function() { + + /** + * Properties of a GetConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IGetConversationRequest + * @property {string|null} [name] GetConversationRequest name + */ + + /** + * Constructs a new GetConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a GetConversationRequest. + * @implements IGetConversationRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest=} [properties] Properties to set + */ + function GetConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConversationRequest name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @instance + */ + GetConversationRequest.prototype.name = ""; + + /** + * Creates a new GetConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.GetConversationRequest} GetConversationRequest instance + */ + GetConversationRequest.create = function create(properties) { + return new GetConversationRequest(properties); + }; + + /** + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationRequest.encode = function encode(message, writer) { + 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 GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.GetConversationRequest} GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.GetConversationRequest} GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConversationRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConversationRequest.verify = function verify(message) { + if (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 GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.GetConversationRequest} GetConversationRequest + */ + GetConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.GetConversationRequest} message GetConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConversationRequest.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 GetConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @instance + * @returns {Object.} JSON object + */ + GetConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConversationRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.GetConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.GetConversationRequest"; + }; + + return GetConversationRequest; + })(); + + v1alpha.ListConversationsRequest = (function() { + + /** + * Properties of a ListConversationsRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListConversationsRequest + * @property {string|null} [parent] ListConversationsRequest parent + * @property {number|null} [pageSize] ListConversationsRequest pageSize + * @property {string|null} [pageToken] ListConversationsRequest pageToken + * @property {string|null} [filter] ListConversationsRequest filter + */ + + /** + * Constructs a new ListConversationsRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListConversationsRequest. + * @implements IListConversationsRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest=} [properties] Properties to set + */ + function ListConversationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversationsRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.parent = ""; + + /** + * ListConversationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.pageSize = 0; + + /** + * ListConversationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.pageToken = ""; + + /** + * ListConversationsRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.filter = ""; + + /** + * Creates a new ListConversationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest} ListConversationsRequest instance + */ + ListConversationsRequest.create = function create(properties) { + return new ListConversationsRequest(properties); + }; + + /** + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsRequest.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 ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest} ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest} ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversationsRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationsRequest.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 ListConversationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest} ListConversationsRequest + */ + ListConversationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest(); + 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 ListConversationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest} message ListConversationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationsRequest.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 ListConversationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConversationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversationsRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest"; + }; + + return ListConversationsRequest; + })(); + + v1alpha.ListConversationsResponse = (function() { + + /** + * Properties of a ListConversationsResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListConversationsResponse + * @property {Array.|null} [conversations] ListConversationsResponse conversations + * @property {string|null} [nextPageToken] ListConversationsResponse nextPageToken + */ + + /** + * Constructs a new ListConversationsResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListConversationsResponse. + * @implements IListConversationsResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse=} [properties] Properties to set + */ + function ListConversationsResponse(properties) { + this.conversations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversationsResponse conversations. + * @member {Array.} conversations + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @instance + */ + ListConversationsResponse.prototype.conversations = $util.emptyArray; + + /** + * ListConversationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @instance + */ + ListConversationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConversationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse} ListConversationsResponse instance + */ + ListConversationsResponse.create = function create(properties) { + return new ListConversationsResponse(properties); + }; + + /** + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversations != null && message.conversations.length) + for (var i = 0; i < message.conversations.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.Conversation.encode(message.conversations[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 ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse} ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.google.cloud.geminidataanalytics.v1alpha.Conversation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse} ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversationsResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversations != null && message.hasOwnProperty("conversations")) { + if (!Array.isArray(message.conversations)) + return "conversations: array expected"; + for (var i = 0; i < message.conversations.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Conversation.verify(message.conversations[i]); + if (error) + return "conversations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse} ListConversationsResponse + */ + ListConversationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse(); + if (object.conversations) { + if (!Array.isArray(object.conversations)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse.conversations: array expected"); + message.conversations = []; + for (var i = 0; i < object.conversations.length; ++i) { + if (typeof object.conversations[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse.conversations: object expected"); + message.conversations[i] = $root.google.cloud.geminidataanalytics.v1alpha.Conversation.fromObject(object.conversations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse} message ListConversationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conversations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversations && message.conversations.length) { + object.conversations = []; + for (var j = 0; j < message.conversations.length; ++j) + object.conversations[j] = $root.google.cloud.geminidataanalytics.v1alpha.Conversation.toObject(message.conversations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConversationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConversationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversationsResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse"; + }; + + return ListConversationsResponse; + })(); + + v1alpha.DeleteConversationRequest = (function() { + + /** + * Properties of a DeleteConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDeleteConversationRequest + * @property {string|null} [name] DeleteConversationRequest name + */ + + /** + * Constructs a new DeleteConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DeleteConversationRequest. + * @implements IDeleteConversationRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest=} [properties] Properties to set + */ + function DeleteConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConversationRequest name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @instance + */ + DeleteConversationRequest.prototype.name = ""; + + /** + * Creates a new DeleteConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest} DeleteConversationRequest instance + */ + DeleteConversationRequest.create = function create(properties) { + return new DeleteConversationRequest(properties); + }; + + /** + * Encodes the specified DeleteConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest} message DeleteConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversationRequest.encode = function encode(message, writer) { + 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 DeleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest} message DeleteConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest} DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest} DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConversationRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConversationRequest.verify = function verify(message) { + if (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 DeleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest} DeleteConversationRequest + */ + DeleteConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest} message DeleteConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConversationRequest.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 DeleteConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConversationRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest"; + }; + + return DeleteConversationRequest; + })(); + + v1alpha.DataAgent = (function() { + + /** + * Properties of a DataAgent. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDataAgent + * @property {google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent|null} [dataAnalyticsAgent] DataAgent dataAnalyticsAgent + * @property {string|null} [name] DataAgent name + * @property {string|null} [displayName] DataAgent displayName + * @property {string|null} [description] DataAgent description + * @property {Object.|null} [labels] DataAgent labels + * @property {google.protobuf.ITimestamp|null} [createTime] DataAgent createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataAgent updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] DataAgent deleteTime + * @property {google.protobuf.ITimestamp|null} [purgeTime] DataAgent purgeTime + */ + + /** + * Constructs a new DataAgent. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataAgent. + * @implements IDataAgent + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgent=} [properties] Properties to set + */ + function DataAgent(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]]; + } + + /** + * DataAgent dataAnalyticsAgent. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent|null|undefined} dataAnalyticsAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.dataAnalyticsAgent = null; + + /** + * DataAgent name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.name = ""; + + /** + * DataAgent displayName. + * @member {string} displayName + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.displayName = ""; + + /** + * DataAgent description. + * @member {string} description + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.description = ""; + + /** + * DataAgent labels. + * @member {Object.} labels + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.labels = $util.emptyObject; + + /** + * DataAgent createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.createTime = null; + + /** + * DataAgent updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.updateTime = null; + + /** + * DataAgent deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.deleteTime = null; + + /** + * DataAgent purgeTime. + * @member {google.protobuf.ITimestamp|null|undefined} purgeTime + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + DataAgent.prototype.purgeTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataAgent type. + * @member {"dataAnalyticsAgent"|undefined} type + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + */ + Object.defineProperty(DataAgent.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["dataAnalyticsAgent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataAgent instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgent=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgent} DataAgent instance + */ + DataAgent.create = function create(properties) { + return new DataAgent(properties); + }; + + /** + * Encodes the specified DataAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgent.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgent} message DataAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgent.encode = function encode(message, writer) { + 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 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.purgeTime != null && Object.hasOwnProperty.call(message, "purgeTime")) + $root.google.protobuf.Timestamp.encode(message.purgeTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.dataAnalyticsAgent != null && Object.hasOwnProperty.call(message, "dataAnalyticsAgent")) + $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.encode(message.dataAnalyticsAgent, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgent} message DataAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAgent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgent} DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DataAgent(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 101: { + message.dataAnalyticsAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.purgeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAgent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgent} DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAgent message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAgent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataAnalyticsAgent != null && message.hasOwnProperty("dataAnalyticsAgent")) { + properties.type = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.verify(message.dataAnalyticsAgent); + if (error) + return "dataAnalyticsAgent." + error; + } + } + 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.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.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.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.purgeTime != null && message.hasOwnProperty("purgeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.purgeTime); + if (error) + return "purgeTime." + error; + } + return null; + }; + + /** + * Creates a DataAgent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgent} DataAgent + */ + DataAgent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DataAgent) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DataAgent(); + if (object.dataAnalyticsAgent != null) { + if (typeof object.dataAnalyticsAgent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAgent.dataAnalyticsAgent: object expected"); + message.dataAnalyticsAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.fromObject(object.dataAnalyticsAgent); + } + 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.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAgent.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAgent.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.geminidataanalytics.v1alpha.DataAgent.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAgent.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.purgeTime != null) { + if (typeof object.purgeTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAgent.purgeTime: object expected"); + message.purgeTime = $root.google.protobuf.Timestamp.fromObject(object.purgeTime); + } + return message; + }; + + /** + * Creates a plain object from a DataAgent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgent} message DataAgent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAgent.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.description = ""; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.purgeTime = 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; + 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.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.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.purgeTime != null && message.hasOwnProperty("purgeTime")) + object.purgeTime = $root.google.protobuf.Timestamp.toObject(message.purgeTime, options); + if (message.dataAnalyticsAgent != null && message.hasOwnProperty("dataAnalyticsAgent")) { + object.dataAnalyticsAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.toObject(message.dataAnalyticsAgent, options); + if (options.oneofs) + object.type = "dataAnalyticsAgent"; + } + return object; + }; + + /** + * Converts this DataAgent to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @instance + * @returns {Object.} JSON object + */ + DataAgent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAgent + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAgent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DataAgent"; + }; + + return DataAgent; + })(); + + v1alpha.DataAnalyticsAgent = (function() { + + /** + * Properties of a DataAnalyticsAgent. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDataAnalyticsAgent + * @property {google.cloud.geminidataanalytics.v1alpha.IContext|null} [stagingContext] DataAnalyticsAgent stagingContext + * @property {google.cloud.geminidataanalytics.v1alpha.IContext|null} [publishedContext] DataAnalyticsAgent publishedContext + * @property {google.cloud.geminidataanalytics.v1alpha.IContext|null} [lastPublishedContext] DataAnalyticsAgent lastPublishedContext + */ + + /** + * Constructs a new DataAnalyticsAgent. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataAnalyticsAgent. + * @implements IDataAnalyticsAgent + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent=} [properties] Properties to set + */ + function DataAnalyticsAgent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataAnalyticsAgent stagingContext. + * @member {google.cloud.geminidataanalytics.v1alpha.IContext|null|undefined} stagingContext + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @instance + */ + DataAnalyticsAgent.prototype.stagingContext = null; + + /** + * DataAnalyticsAgent publishedContext. + * @member {google.cloud.geminidataanalytics.v1alpha.IContext|null|undefined} publishedContext + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @instance + */ + DataAnalyticsAgent.prototype.publishedContext = null; + + /** + * DataAnalyticsAgent lastPublishedContext. + * @member {google.cloud.geminidataanalytics.v1alpha.IContext|null|undefined} lastPublishedContext + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @instance + */ + DataAnalyticsAgent.prototype.lastPublishedContext = null; + + /** + * Creates a new DataAnalyticsAgent instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent} DataAnalyticsAgent instance + */ + DataAnalyticsAgent.create = function create(properties) { + return new DataAnalyticsAgent(properties); + }; + + /** + * Encodes the specified DataAnalyticsAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent} message DataAnalyticsAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAnalyticsAgent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stagingContext != null && Object.hasOwnProperty.call(message, "stagingContext")) + $root.google.cloud.geminidataanalytics.v1alpha.Context.encode(message.stagingContext, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.publishedContext != null && Object.hasOwnProperty.call(message, "publishedContext")) + $root.google.cloud.geminidataanalytics.v1alpha.Context.encode(message.publishedContext, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastPublishedContext != null && Object.hasOwnProperty.call(message, "lastPublishedContext")) + $root.google.cloud.geminidataanalytics.v1alpha.Context.encode(message.lastPublishedContext, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataAnalyticsAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAnalyticsAgent} message DataAnalyticsAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAnalyticsAgent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent} DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAnalyticsAgent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + message.stagingContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.decode(reader, reader.uint32()); + break; + } + case 6: { + message.publishedContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastPublishedContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent} DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAnalyticsAgent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAnalyticsAgent message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAnalyticsAgent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stagingContext != null && message.hasOwnProperty("stagingContext")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Context.verify(message.stagingContext); + if (error) + return "stagingContext." + error; + } + if (message.publishedContext != null && message.hasOwnProperty("publishedContext")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Context.verify(message.publishedContext); + if (error) + return "publishedContext." + error; + } + if (message.lastPublishedContext != null && message.hasOwnProperty("lastPublishedContext")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Context.verify(message.lastPublishedContext); + if (error) + return "lastPublishedContext." + error; + } + return null; + }; + + /** + * Creates a DataAnalyticsAgent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent} DataAnalyticsAgent + */ + DataAnalyticsAgent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent(); + if (object.stagingContext != null) { + if (typeof object.stagingContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.stagingContext: object expected"); + message.stagingContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.fromObject(object.stagingContext); + } + if (object.publishedContext != null) { + if (typeof object.publishedContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.publishedContext: object expected"); + message.publishedContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.fromObject(object.publishedContext); + } + if (object.lastPublishedContext != null) { + if (typeof object.lastPublishedContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent.lastPublishedContext: object expected"); + message.lastPublishedContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.fromObject(object.lastPublishedContext); + } + return message; + }; + + /** + * Creates a plain object from a DataAnalyticsAgent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent} message DataAnalyticsAgent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAnalyticsAgent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.stagingContext = null; + object.publishedContext = null; + object.lastPublishedContext = null; + } + if (message.stagingContext != null && message.hasOwnProperty("stagingContext")) + object.stagingContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.toObject(message.stagingContext, options); + if (message.publishedContext != null && message.hasOwnProperty("publishedContext")) + object.publishedContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.toObject(message.publishedContext, options); + if (message.lastPublishedContext != null && message.hasOwnProperty("lastPublishedContext")) + object.lastPublishedContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.toObject(message.lastPublishedContext, options); + return object; + }; + + /** + * Converts this DataAnalyticsAgent to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @instance + * @returns {Object.} JSON object + */ + DataAnalyticsAgent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAnalyticsAgent + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAnalyticsAgent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DataAnalyticsAgent"; + }; + + return DataAnalyticsAgent; + })(); + + v1alpha.DataAgentService = (function() { + + /** + * Constructs a new DataAgentService service. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataAgentService + * @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 DataAgentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataAgentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataAgentService; + + /** + * Creates new DataAgentService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @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 {DataAgentService} RPC service. Useful where requests and/or responses are streamed. + */ + DataAgentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|listDataAgents}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef ListDataAgentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse} [response] ListDataAgentsResponse + */ + + /** + * Calls ListDataAgents. + * @function listDataAgents + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest} request ListDataAgentsRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListDataAgentsCallback} callback Node-style callback called with the error, if any, and ListDataAgentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.listDataAgents = function listDataAgents(request, callback) { + return this.rpcCall(listDataAgents, $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest, $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse, request, callback); + }, "name", { value: "ListDataAgents" }); + + /** + * Calls ListDataAgents. + * @function listDataAgents + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest} request ListDataAgentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|listAccessibleDataAgents}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef ListAccessibleDataAgentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse} [response] ListAccessibleDataAgentsResponse + */ + + /** + * Calls ListAccessibleDataAgents. + * @function listAccessibleDataAgents + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest} request ListAccessibleDataAgentsRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListAccessibleDataAgentsCallback} callback Node-style callback called with the error, if any, and ListAccessibleDataAgentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.listAccessibleDataAgents = function listAccessibleDataAgents(request, callback) { + return this.rpcCall(listAccessibleDataAgents, $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest, $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse, request, callback); + }, "name", { value: "ListAccessibleDataAgents" }); + + /** + * Calls ListAccessibleDataAgents. + * @function listAccessibleDataAgents + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest} request ListAccessibleDataAgentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|getDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef GetDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgent} [response] DataAgent + */ + + /** + * Calls GetDataAgent. + * @function getDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest} request GetDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetDataAgentCallback} callback Node-style callback called with the error, if any, and DataAgent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.getDataAgent = function getDataAgent(request, callback) { + return this.rpcCall(getDataAgent, $root.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest, $root.google.cloud.geminidataanalytics.v1alpha.DataAgent, request, callback); + }, "name", { value: "GetDataAgent" }); + + /** + * Calls GetDataAgent. + * @function getDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest} request GetDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|createDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef CreateDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDataAgent. + * @function createDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest} request CreateDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.CreateDataAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.createDataAgent = function createDataAgent(request, callback) { + return this.rpcCall(createDataAgent, $root.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDataAgent" }); + + /** + * Calls CreateDataAgent. + * @function createDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest} request CreateDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|updateDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef UpdateDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataAgent. + * @function updateDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest} request UpdateDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.UpdateDataAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.updateDataAgent = function updateDataAgent(request, callback) { + return this.rpcCall(updateDataAgent, $root.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataAgent" }); + + /** + * Calls UpdateDataAgent. + * @function updateDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest} request UpdateDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|deleteDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef DeleteDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDataAgent. + * @function deleteDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest} request DeleteDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.DeleteDataAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.deleteDataAgent = function deleteDataAgent(request, callback) { + return this.rpcCall(deleteDataAgent, $root.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataAgent" }); + + /** + * Calls DeleteDataAgent. + * @function deleteDataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest} request DeleteDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|getIamPolicy}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataAgentService|setIamPolicy}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataAgentService; + })(); + + v1alpha.ListDataAgentsRequest = (function() { + + /** + * Properties of a ListDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListDataAgentsRequest + * @property {string|null} [parent] ListDataAgentsRequest parent + * @property {number|null} [pageSize] ListDataAgentsRequest pageSize + * @property {string|null} [pageToken] ListDataAgentsRequest pageToken + * @property {string|null} [filter] ListDataAgentsRequest filter + * @property {string|null} [orderBy] ListDataAgentsRequest orderBy + * @property {boolean|null} [showDeleted] ListDataAgentsRequest showDeleted + */ + + /** + * Constructs a new ListDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListDataAgentsRequest. + * @implements IListDataAgentsRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest=} [properties] Properties to set + */ + function ListDataAgentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAgentsRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.parent = ""; + + /** + * ListDataAgentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.pageSize = 0; + + /** + * ListDataAgentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.pageToken = ""; + + /** + * ListDataAgentsRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.filter = ""; + + /** + * ListDataAgentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.orderBy = ""; + + /** + * ListDataAgentsRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.showDeleted = false; + + /** + * Creates a new ListDataAgentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest} ListDataAgentsRequest instance + */ + ListDataAgentsRequest.create = function create(properties) { + return new ListDataAgentsRequest(properties); + }; + + /** + * Encodes the specified ListDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest} message ListDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsRequest.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); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showDeleted); + return writer; + }; + + /** + * Encodes the specified ListDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest} message ListDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest} ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.showDeleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest} ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAgentsRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAgentsRequest.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"; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + return null; + }; + + /** + * Creates a ListDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest} ListDataAgentsRequest + */ + ListDataAgentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest(); + 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); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + return message; + }; + + /** + * Creates a plain object from a ListDataAgentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest} message ListDataAgentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAgentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.showDeleted = false; + } + 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; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + return object; + }; + + /** + * Converts this ListDataAgentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataAgentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAgentsRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAgentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest"; + }; + + return ListDataAgentsRequest; + })(); + + v1alpha.ListDataAgentsResponse = (function() { + + /** + * Properties of a ListDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListDataAgentsResponse + * @property {Array.|null} [dataAgents] ListDataAgentsResponse dataAgents + * @property {string|null} [nextPageToken] ListDataAgentsResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataAgentsResponse unreachable + */ + + /** + * Constructs a new ListDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListDataAgentsResponse. + * @implements IListDataAgentsResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse=} [properties] Properties to set + */ + function ListDataAgentsResponse(properties) { + this.dataAgents = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAgentsResponse dataAgents. + * @member {Array.} dataAgents + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @instance + */ + ListDataAgentsResponse.prototype.dataAgents = $util.emptyArray; + + /** + * ListDataAgentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @instance + */ + ListDataAgentsResponse.prototype.nextPageToken = ""; + + /** + * ListDataAgentsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @instance + */ + ListDataAgentsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataAgentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse} ListDataAgentsResponse instance + */ + ListDataAgentsResponse.create = function create(properties) { + return new ListDataAgentsResponse(properties); + }; + + /** + * Encodes the specified ListDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse} message ListDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAgents != null && message.dataAgents.length) + for (var i = 0; i < message.dataAgents.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.encode(message.dataAgents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse} message ListDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse} ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataAgents && message.dataAgents.length)) + message.dataAgents = []; + message.dataAgents.push($root.google.cloud.geminidataanalytics.v1alpha.DataAgent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse} ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAgentsResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAgentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAgents != null && message.hasOwnProperty("dataAgents")) { + if (!Array.isArray(message.dataAgents)) + return "dataAgents: array expected"; + for (var i = 0; i < message.dataAgents.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.verify(message.dataAgents[i]); + if (error) + return "dataAgents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse} ListDataAgentsResponse + */ + ListDataAgentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse(); + if (object.dataAgents) { + if (!Array.isArray(object.dataAgents)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse.dataAgents: array expected"); + message.dataAgents = []; + for (var i = 0; i < object.dataAgents.length; ++i) { + if (typeof object.dataAgents[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse.dataAgents: object expected"); + message.dataAgents[i] = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.fromObject(object.dataAgents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListDataAgentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse} message ListDataAgentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAgentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataAgents = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataAgents && message.dataAgents.length) { + object.dataAgents = []; + for (var j = 0; j < message.dataAgents.length; ++j) + object.dataAgents[j] = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.toObject(message.dataAgents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListDataAgentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataAgentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAgentsResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAgentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse"; + }; + + return ListDataAgentsResponse; + })(); + + v1alpha.ListAccessibleDataAgentsRequest = (function() { + + /** + * Properties of a ListAccessibleDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListAccessibleDataAgentsRequest + * @property {string|null} [parent] ListAccessibleDataAgentsRequest parent + * @property {number|null} [pageSize] ListAccessibleDataAgentsRequest pageSize + * @property {string|null} [pageToken] ListAccessibleDataAgentsRequest pageToken + * @property {string|null} [filter] ListAccessibleDataAgentsRequest filter + * @property {string|null} [orderBy] ListAccessibleDataAgentsRequest orderBy + * @property {boolean|null} [showDeleted] ListAccessibleDataAgentsRequest showDeleted + * @property {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter|null} [creatorFilter] ListAccessibleDataAgentsRequest creatorFilter + */ + + /** + * Constructs a new ListAccessibleDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListAccessibleDataAgentsRequest. + * @implements IListAccessibleDataAgentsRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest=} [properties] Properties to set + */ + function ListAccessibleDataAgentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccessibleDataAgentsRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.parent = ""; + + /** + * ListAccessibleDataAgentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.pageSize = 0; + + /** + * ListAccessibleDataAgentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.pageToken = ""; + + /** + * ListAccessibleDataAgentsRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.filter = ""; + + /** + * ListAccessibleDataAgentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.orderBy = ""; + + /** + * ListAccessibleDataAgentsRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.showDeleted = false; + + /** + * ListAccessibleDataAgentsRequest creatorFilter. + * @member {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter} creatorFilter + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.creatorFilter = 0; + + /** + * Creates a new ListAccessibleDataAgentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest instance + */ + ListAccessibleDataAgentsRequest.create = function create(properties) { + return new ListAccessibleDataAgentsRequest(properties); + }; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest} message ListAccessibleDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsRequest.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); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showDeleted); + if (message.creatorFilter != null && Object.hasOwnProperty.call(message, "creatorFilter")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creatorFilter); + return writer; + }; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest} message ListAccessibleDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.showDeleted = reader.bool(); + break; + } + case 7: { + message.creatorFilter = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccessibleDataAgentsRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccessibleDataAgentsRequest.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"; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + if (message.creatorFilter != null && message.hasOwnProperty("creatorFilter")) + switch (message.creatorFilter) { + default: + return "creatorFilter: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ListAccessibleDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest + */ + ListAccessibleDataAgentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest(); + 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); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + switch (object.creatorFilter) { + default: + if (typeof object.creatorFilter === "number") { + message.creatorFilter = object.creatorFilter; + break; + } + break; + case "CREATOR_FILTER_UNSPECIFIED": + case 0: + message.creatorFilter = 0; + break; + case "NONE": + case 1: + message.creatorFilter = 1; + break; + case "CREATOR_ONLY": + case 2: + message.creatorFilter = 2; + break; + case "NOT_CREATOR_ONLY": + case 3: + message.creatorFilter = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListAccessibleDataAgentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest} message ListAccessibleDataAgentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccessibleDataAgentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.showDeleted = false; + object.creatorFilter = options.enums === String ? "CREATOR_FILTER_UNSPECIFIED" : 0; + } + 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; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + if (message.creatorFilter != null && message.hasOwnProperty("creatorFilter")) + object.creatorFilter = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter[message.creatorFilter] === undefined ? message.creatorFilter : $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter[message.creatorFilter] : message.creatorFilter; + return object; + }; + + /** + * Converts this ListAccessibleDataAgentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAccessibleDataAgentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccessibleDataAgentsRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccessibleDataAgentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest"; + }; + + /** + * CreatorFilter enum. + * @name google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter + * @enum {number} + * @property {number} CREATOR_FILTER_UNSPECIFIED=0 CREATOR_FILTER_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} CREATOR_ONLY=2 CREATOR_ONLY value + * @property {number} NOT_CREATOR_ONLY=3 NOT_CREATOR_ONLY value + */ + ListAccessibleDataAgentsRequest.CreatorFilter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CREATOR_FILTER_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "CREATOR_ONLY"] = 2; + values[valuesById[3] = "NOT_CREATOR_ONLY"] = 3; + return values; + })(); + + return ListAccessibleDataAgentsRequest; + })(); + + v1alpha.ListAccessibleDataAgentsResponse = (function() { + + /** + * Properties of a ListAccessibleDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListAccessibleDataAgentsResponse + * @property {Array.|null} [dataAgents] ListAccessibleDataAgentsResponse dataAgents + * @property {string|null} [nextPageToken] ListAccessibleDataAgentsResponse nextPageToken + * @property {Array.|null} [unreachable] ListAccessibleDataAgentsResponse unreachable + */ + + /** + * Constructs a new ListAccessibleDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListAccessibleDataAgentsResponse. + * @implements IListAccessibleDataAgentsResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse=} [properties] Properties to set + */ + function ListAccessibleDataAgentsResponse(properties) { + this.dataAgents = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccessibleDataAgentsResponse dataAgents. + * @member {Array.} dataAgents + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @instance + */ + ListAccessibleDataAgentsResponse.prototype.dataAgents = $util.emptyArray; + + /** + * ListAccessibleDataAgentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @instance + */ + ListAccessibleDataAgentsResponse.prototype.nextPageToken = ""; + + /** + * ListAccessibleDataAgentsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @instance + */ + ListAccessibleDataAgentsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListAccessibleDataAgentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse instance + */ + ListAccessibleDataAgentsResponse.create = function create(properties) { + return new ListAccessibleDataAgentsResponse(properties); + }; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse} message ListAccessibleDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAgents != null && message.dataAgents.length) + for (var i = 0; i < message.dataAgents.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.encode(message.dataAgents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse} message ListAccessibleDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataAgents && message.dataAgents.length)) + message.dataAgents = []; + message.dataAgents.push($root.google.cloud.geminidataanalytics.v1alpha.DataAgent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccessibleDataAgentsResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccessibleDataAgentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAgents != null && message.hasOwnProperty("dataAgents")) { + if (!Array.isArray(message.dataAgents)) + return "dataAgents: array expected"; + for (var i = 0; i < message.dataAgents.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.verify(message.dataAgents[i]); + if (error) + return "dataAgents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListAccessibleDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse + */ + ListAccessibleDataAgentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse(); + if (object.dataAgents) { + if (!Array.isArray(object.dataAgents)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse.dataAgents: array expected"); + message.dataAgents = []; + for (var i = 0; i < object.dataAgents.length; ++i) { + if (typeof object.dataAgents[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse.dataAgents: object expected"); + message.dataAgents[i] = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.fromObject(object.dataAgents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListAccessibleDataAgentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse} message ListAccessibleDataAgentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccessibleDataAgentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataAgents = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataAgents && message.dataAgents.length) { + object.dataAgents = []; + for (var j = 0; j < message.dataAgents.length; ++j) + object.dataAgents[j] = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.toObject(message.dataAgents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListAccessibleDataAgentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAccessibleDataAgentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccessibleDataAgentsResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccessibleDataAgentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse"; + }; + + return ListAccessibleDataAgentsResponse; + })(); + + v1alpha.GetDataAgentRequest = (function() { + + /** + * Properties of a GetDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IGetDataAgentRequest + * @property {string|null} [name] GetDataAgentRequest name + */ + + /** + * Constructs a new GetDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a GetDataAgentRequest. + * @implements IGetDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest=} [properties] Properties to set + */ + function GetDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataAgentRequest name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @instance + */ + GetDataAgentRequest.prototype.name = ""; + + /** + * Creates a new GetDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest} GetDataAgentRequest instance + */ + GetDataAgentRequest.create = function create(properties) { + return new GetDataAgentRequest(properties); + }; + + /** + * Encodes the specified GetDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest} message GetDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAgentRequest.encode = function encode(message, writer) { + 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 GetDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest} message GetDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest} GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest} GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataAgentRequest.verify = function verify(message) { + if (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 GetDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest} GetDataAgentRequest + */ + GetDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest} message GetDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataAgentRequest.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 GetDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest"; + }; + + return GetDataAgentRequest; + })(); + + v1alpha.CreateDataAgentRequest = (function() { + + /** + * Properties of a CreateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ICreateDataAgentRequest + * @property {string|null} [parent] CreateDataAgentRequest parent + * @property {string|null} [dataAgentId] CreateDataAgentRequest dataAgentId + * @property {google.cloud.geminidataanalytics.v1alpha.IDataAgent|null} [dataAgent] CreateDataAgentRequest dataAgent + * @property {string|null} [requestId] CreateDataAgentRequest requestId + */ + + /** + * Constructs a new CreateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a CreateDataAgentRequest. + * @implements ICreateDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest=} [properties] Properties to set + */ + function CreateDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataAgentRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.parent = ""; + + /** + * CreateDataAgentRequest dataAgentId. + * @member {string} dataAgentId + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.dataAgentId = ""; + + /** + * CreateDataAgentRequest dataAgent. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataAgent|null|undefined} dataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.dataAgent = null; + + /** + * CreateDataAgentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.requestId = ""; + + /** + * Creates a new CreateDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest} CreateDataAgentRequest instance + */ + CreateDataAgentRequest.create = function create(properties) { + return new CreateDataAgentRequest(properties); + }; + + /** + * Encodes the specified CreateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest} message CreateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAgentRequest.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.dataAgentId != null && Object.hasOwnProperty.call(message, "dataAgentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataAgentId); + if (message.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) + $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.encode(message.dataAgent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest} message CreateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest} CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataAgentId = reader.string(); + break; + } + case 3: { + message.dataAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest} CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataAgentRequest.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.dataAgentId != null && message.hasOwnProperty("dataAgentId")) + if (!$util.isString(message.dataAgentId)) + return "dataAgentId: string expected"; + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.verify(message.dataAgent); + if (error) + return "dataAgent." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest} CreateDataAgentRequest + */ + CreateDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataAgentId != null) + message.dataAgentId = String(object.dataAgentId); + if (object.dataAgent != null) { + if (typeof object.dataAgent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest.dataAgent: object expected"); + message.dataAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.fromObject(object.dataAgent); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest} message CreateDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataAgentId = ""; + object.dataAgent = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataAgentId != null && message.hasOwnProperty("dataAgentId")) + object.dataAgentId = message.dataAgentId; + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + object.dataAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.toObject(message.dataAgent, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest"; + }; + + return CreateDataAgentRequest; + })(); + + v1alpha.UpdateDataAgentRequest = (function() { + + /** + * Properties of an UpdateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IUpdateDataAgentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataAgentRequest updateMask + * @property {google.cloud.geminidataanalytics.v1alpha.IDataAgent|null} [dataAgent] UpdateDataAgentRequest dataAgent + * @property {string|null} [requestId] UpdateDataAgentRequest requestId + */ + + /** + * Constructs a new UpdateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an UpdateDataAgentRequest. + * @implements IUpdateDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest=} [properties] Properties to set + */ + function UpdateDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataAgentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @instance + */ + UpdateDataAgentRequest.prototype.updateMask = null; + + /** + * UpdateDataAgentRequest dataAgent. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataAgent|null|undefined} dataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @instance + */ + UpdateDataAgentRequest.prototype.dataAgent = null; + + /** + * UpdateDataAgentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @instance + */ + UpdateDataAgentRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest} UpdateDataAgentRequest instance + */ + UpdateDataAgentRequest.create = function create(properties) { + return new UpdateDataAgentRequest(properties); + }; + + /** + * Encodes the specified UpdateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest} message UpdateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAgentRequest.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.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) + $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.encode(message.dataAgent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest} message UpdateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest} UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dataAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest} UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataAgentRequest.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.dataAgent != null && message.hasOwnProperty("dataAgent")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.verify(message.dataAgent); + if (error) + return "dataAgent." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest} UpdateDataAgentRequest + */ + UpdateDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataAgent != null) { + if (typeof object.dataAgent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest.dataAgent: object expected"); + message.dataAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.fromObject(object.dataAgent); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest} message UpdateDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataAgent = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + object.dataAgent = $root.google.cloud.geminidataanalytics.v1alpha.DataAgent.toObject(message.dataAgent, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest"; + }; + + return UpdateDataAgentRequest; + })(); + + v1alpha.DeleteDataAgentRequest = (function() { + + /** + * Properties of a DeleteDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDeleteDataAgentRequest + * @property {string|null} [name] DeleteDataAgentRequest name + * @property {string|null} [requestId] DeleteDataAgentRequest requestId + */ + + /** + * Constructs a new DeleteDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DeleteDataAgentRequest. + * @implements IDeleteDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest=} [properties] Properties to set + */ + function DeleteDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataAgentRequest name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @instance + */ + DeleteDataAgentRequest.prototype.name = ""; + + /** + * DeleteDataAgentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @instance + */ + DeleteDataAgentRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest} DeleteDataAgentRequest instance + */ + DeleteDataAgentRequest.create = function create(properties) { + return new DeleteDataAgentRequest(properties); + }; + + /** + * Encodes the specified DeleteDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest} message DeleteDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAgentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest} message DeleteDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest} DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest} DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataAgentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest} DeleteDataAgentRequest + */ + DeleteDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest} message DeleteDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest"; + }; + + return DeleteDataAgentRequest; + })(); + + v1alpha.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @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.geminidataanalytics.v1alpha + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.OperationMetadata) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.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.geminidataanalytics.v1alpha.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1alpha.DataChatService = (function() { + + /** + * Constructs a new DataChatService service. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataChatService + * @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 DataChatService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataChatService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataChatService; + + /** + * Creates new DataChatService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @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 {DataChatService} RPC service. Useful where requests and/or responses are streamed. + */ + DataChatService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|chat}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @typedef ChatCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.Message} [response] Message + */ + + /** + * Calls Chat. + * @function chat + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IChatRequest} request ChatRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataChatService.ChatCallback} callback Node-style callback called with the error, if any, and Message + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.chat = function chat(request, callback) { + return this.rpcCall(chat, $root.google.cloud.geminidataanalytics.v1alpha.ChatRequest, $root.google.cloud.geminidataanalytics.v1alpha.Message, request, callback); + }, "name", { value: "Chat" }); + + /** + * Calls Chat. + * @function chat + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IChatRequest} request ChatRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|createConversation}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @typedef CreateConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.Conversation} [response] Conversation + */ + + /** + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataChatService.CreateConversationCallback} callback Node-style callback called with the error, if any, and Conversation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.createConversation = function createConversation(request, callback) { + return this.rpcCall(createConversation, $root.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest, $root.google.cloud.geminidataanalytics.v1alpha.Conversation, request, callback); + }, "name", { value: "CreateConversation" }); + + /** + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|deleteConversation}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @typedef DeleteConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConversation. + * @function deleteConversation + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest} request DeleteConversationRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataChatService.DeleteConversationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.deleteConversation = function deleteConversation(request, callback) { + return this.rpcCall(deleteConversation, $root.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConversation" }); + + /** + * Calls DeleteConversation. + * @function deleteConversation + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest} request DeleteConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|getConversation}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @typedef GetConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.Conversation} [response] Conversation + */ + + /** + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest} request GetConversationRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataChatService.GetConversationCallback} callback Node-style callback called with the error, if any, and Conversation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.getConversation = function getConversation(request, callback) { + return this.rpcCall(getConversation, $root.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest, $root.google.cloud.geminidataanalytics.v1alpha.Conversation, request, callback); + }, "name", { value: "GetConversation" }); + + /** + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest} request GetConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|listConversations}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @typedef ListConversationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse} [response] ListConversationsResponse + */ + + /** + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest} request ListConversationsRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataChatService.ListConversationsCallback} callback Node-style callback called with the error, if any, and ListConversationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.listConversations = function listConversations(request, callback) { + return this.rpcCall(listConversations, $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest, $root.google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse, request, callback); + }, "name", { value: "ListConversations" }); + + /** + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest} request ListConversationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1alpha.DataChatService|listMessages}. + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @typedef ListMessagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse} [response] ListMessagesResponse + */ + + /** + * Calls ListMessages. + * @function listMessages + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest} request ListMessagesRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1alpha.DataChatService.ListMessagesCallback} callback Node-style callback called with the error, if any, and ListMessagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.listMessages = function listMessages(request, callback) { + return this.rpcCall(listMessages, $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest, $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse, request, callback); + }, "name", { value: "ListMessages" }); + + /** + * Calls ListMessages. + * @function listMessages + * @memberof google.cloud.geminidataanalytics.v1alpha.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest} request ListMessagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataChatService; + })(); + + v1alpha.ListMessagesRequest = (function() { + + /** + * Properties of a ListMessagesRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListMessagesRequest + * @property {string|null} [parent] ListMessagesRequest parent + * @property {number|null} [pageSize] ListMessagesRequest pageSize + * @property {string|null} [pageToken] ListMessagesRequest pageToken + * @property {string|null} [filter] ListMessagesRequest filter + */ + + /** + * Constructs a new ListMessagesRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListMessagesRequest. + * @implements IListMessagesRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest=} [properties] Properties to set + */ + function ListMessagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMessagesRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.parent = ""; + + /** + * ListMessagesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.pageSize = 0; + + /** + * ListMessagesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.pageToken = ""; + + /** + * ListMessagesRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.filter = ""; + + /** + * Creates a new ListMessagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest} ListMessagesRequest instance + */ + ListMessagesRequest.create = function create(properties) { + return new ListMessagesRequest(properties); + }; + + /** + * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesRequest.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 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 ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest} ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.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 ListMessagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest} ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessagesRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessagesRequest.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 ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest} ListMessagesRequest + */ + ListMessagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest(); + 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 ListMessagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest} message ListMessagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessagesRequest.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 ListMessagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListMessagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessagesRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest"; + }; + + return ListMessagesRequest; + })(); + + v1alpha.ListMessagesResponse = (function() { + + /** + * Properties of a ListMessagesResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IListMessagesResponse + * @property {Array.|null} [messages] ListMessagesResponse messages + * @property {string|null} [nextPageToken] ListMessagesResponse nextPageToken + */ + + /** + * Constructs a new ListMessagesResponse. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ListMessagesResponse. + * @implements IListMessagesResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse=} [properties] Properties to set + */ + function ListMessagesResponse(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMessagesResponse messages. + * @member {Array.} messages + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @instance + */ + ListMessagesResponse.prototype.messages = $util.emptyArray; + + /** + * ListMessagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @instance + */ + ListMessagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMessagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse} ListMessagesResponse instance + */ + ListMessagesResponse.create = function create(properties) { + return new ListMessagesResponse(properties); + }; + + /** + * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.StorageMessage.encode(message.messages[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 ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse} ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.geminidataanalytics.v1alpha.StorageMessage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse} ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessagesResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.StorageMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse} ListMessagesResponse + */ + ListMessagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse.messages: object expected"); + message.messages[i] = $root.google.cloud.geminidataanalytics.v1alpha.StorageMessage.fromObject(object.messages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse} message ListMessagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.geminidataanalytics.v1alpha.StorageMessage.toObject(message.messages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMessagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListMessagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessagesResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse"; + }; + + return ListMessagesResponse; + })(); + + v1alpha.StorageMessage = (function() { + + /** + * Properties of a StorageMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IStorageMessage + * @property {string|null} [messageId] StorageMessage messageId + * @property {google.cloud.geminidataanalytics.v1alpha.IMessage|null} [message] StorageMessage message + */ + + /** + * Constructs a new StorageMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a StorageMessage. + * @implements IStorageMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IStorageMessage=} [properties] Properties to set + */ + function StorageMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageMessage messageId. + * @member {string} messageId + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @instance + */ + StorageMessage.prototype.messageId = ""; + + /** + * StorageMessage message. + * @member {google.cloud.geminidataanalytics.v1alpha.IMessage|null|undefined} message + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @instance + */ + StorageMessage.prototype.message = null; + + /** + * Creates a new StorageMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStorageMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.StorageMessage} StorageMessage instance + */ + StorageMessage.create = function create(properties) { + return new StorageMessage(properties); + }; + + /** + * Encodes the specified StorageMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StorageMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStorageMessage} message StorageMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageId); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.geminidataanalytics.v1alpha.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.StorageMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IStorageMessage} message StorageMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.StorageMessage} StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.StorageMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageId = reader.string(); + break; + } + case 2: { + message.message = $root.google.cloud.geminidataanalytics.v1alpha.Message.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.StorageMessage} StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (!$util.isString(message.messageId)) + return "messageId: string expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Message.verify(message.message); + if (error) + return "message." + error; + } + return null; + }; + + /** + * Creates a StorageMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.StorageMessage} StorageMessage + */ + StorageMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.StorageMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.StorageMessage(); + if (object.messageId != null) + message.messageId = String(object.messageId); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.StorageMessage.message: object expected"); + message.message = $root.google.cloud.geminidataanalytics.v1alpha.Message.fromObject(object.message); + } + return message; + }; + + /** + * Creates a plain object from a StorageMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.StorageMessage} message StorageMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.messageId = ""; + object.message = null; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + object.messageId = message.messageId; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.google.cloud.geminidataanalytics.v1alpha.Message.toObject(message.message, options); + return object; + }; + + /** + * Converts this StorageMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @instance + * @returns {Object.} JSON object + */ + StorageMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.StorageMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.StorageMessage"; + }; + + return StorageMessage; + })(); + + v1alpha.ChatRequest = (function() { + + /** + * Properties of a ChatRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IChatRequest + * @property {google.cloud.geminidataanalytics.v1alpha.IContext|null} [inlineContext] ChatRequest inlineContext + * @property {google.cloud.geminidataanalytics.v1alpha.IConversationReference|null} [conversationReference] ChatRequest conversationReference + * @property {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null} [dataAgentContext] ChatRequest dataAgentContext + * @property {string|null} [project] ChatRequest project + * @property {string|null} [parent] ChatRequest parent + * @property {Array.|null} [messages] ChatRequest messages + */ + + /** + * Constructs a new ChatRequest. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ChatRequest. + * @implements IChatRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IChatRequest=} [properties] Properties to set + */ + function ChatRequest(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChatRequest inlineContext. + * @member {google.cloud.geminidataanalytics.v1alpha.IContext|null|undefined} inlineContext + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + */ + ChatRequest.prototype.inlineContext = null; + + /** + * ChatRequest conversationReference. + * @member {google.cloud.geminidataanalytics.v1alpha.IConversationReference|null|undefined} conversationReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + */ + ChatRequest.prototype.conversationReference = null; + + /** + * ChatRequest dataAgentContext. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null|undefined} dataAgentContext + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + */ + ChatRequest.prototype.dataAgentContext = null; + + /** + * ChatRequest project. + * @member {string} project + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + */ + ChatRequest.prototype.project = ""; + + /** + * ChatRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + */ + ChatRequest.prototype.parent = ""; + + /** + * ChatRequest messages. + * @member {Array.} messages + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + */ + ChatRequest.prototype.messages = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChatRequest contextProvider. + * @member {"inlineContext"|"conversationReference"|"dataAgentContext"|undefined} contextProvider + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + */ + Object.defineProperty(ChatRequest.prototype, "contextProvider", { + get: $util.oneOfGetter($oneOfFields = ["inlineContext", "conversationReference", "dataAgentContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChatRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChatRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChatRequest} ChatRequest instance + */ + ChatRequest.create = function create(properties) { + return new ChatRequest(properties); + }; + + /** + * Encodes the specified ChatRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChatRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChatRequest} message ChatRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.Message.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); + if (message.inlineContext != null && Object.hasOwnProperty.call(message, "inlineContext")) + $root.google.cloud.geminidataanalytics.v1alpha.Context.encode(message.inlineContext, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.conversationReference != null && Object.hasOwnProperty.call(message, "conversationReference")) + $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference.encode(message.conversationReference, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.dataAgentContext != null && Object.hasOwnProperty.call(message, "dataAgentContext")) + $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChatRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChatRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChatRequest} message ChatRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChatRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChatRequest} ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChatRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 101: { + message.inlineContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.decode(reader, reader.uint32()); + break; + } + case 103: { + message.conversationReference = $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference.decode(reader, reader.uint32()); + break; + } + case 104: { + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.decode(reader, reader.uint32()); + break; + } + case 1: { + message.project = reader.string(); + break; + } + case 3: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.geminidataanalytics.v1alpha.Message.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChatRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChatRequest} ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChatRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChatRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Context.verify(message.inlineContext); + if (error) + return "inlineContext." + error; + } + } + if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { + if (properties.contextProvider === 1) + return "contextProvider: multiple values"; + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference.verify(message.conversationReference); + if (error) + return "conversationReference." + error; + } + } + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + if (properties.contextProvider === 1) + return "contextProvider: multiple values"; + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.verify(message.dataAgentContext); + if (error) + return "dataAgentContext." + error; + } + } + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + return null; + }; + + /** + * Creates a ChatRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChatRequest} ChatRequest + */ + ChatRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChatRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ChatRequest(); + if (object.inlineContext != null) { + if (typeof object.inlineContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChatRequest.inlineContext: object expected"); + message.inlineContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.fromObject(object.inlineContext); + } + if (object.conversationReference != null) { + if (typeof object.conversationReference !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChatRequest.conversationReference: object expected"); + message.conversationReference = $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference.fromObject(object.conversationReference); + } + if (object.dataAgentContext != null) { + if (typeof object.dataAgentContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChatRequest.dataAgentContext: object expected"); + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.fromObject(object.dataAgentContext); + } + if (object.project != null) + message.project = String(object.project); + if (object.parent != null) + message.parent = String(object.parent); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChatRequest.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChatRequest.messages: object expected"); + message.messages[i] = $root.google.cloud.geminidataanalytics.v1alpha.Message.fromObject(object.messages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChatRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChatRequest} message ChatRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChatRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) { + object.project = ""; + object.parent = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.geminidataanalytics.v1alpha.Message.toObject(message.messages[j], options); + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { + object.inlineContext = $root.google.cloud.geminidataanalytics.v1alpha.Context.toObject(message.inlineContext, options); + if (options.oneofs) + object.contextProvider = "inlineContext"; + } + if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { + object.conversationReference = $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference.toObject(message.conversationReference, options); + if (options.oneofs) + object.contextProvider = "conversationReference"; + } + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.toObject(message.dataAgentContext, options); + if (options.oneofs) + object.contextProvider = "dataAgentContext"; + } + return object; + }; + + /** + * Converts this ChatRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @instance + * @returns {Object.} JSON object + */ + ChatRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChatRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChatRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChatRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChatRequest"; + }; + + return ChatRequest; + })(); + + v1alpha.DataAgentContext = (function() { + + /** + * Properties of a DataAgentContext. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDataAgentContext + * @property {string|null} [dataAgent] DataAgentContext dataAgent + * @property {google.cloud.geminidataanalytics.v1alpha.ICredentials|null} [credentials] DataAgentContext credentials + * @property {google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion|null} [contextVersion] DataAgentContext contextVersion + */ + + /** + * Constructs a new DataAgentContext. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataAgentContext. + * @implements IDataAgentContext + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext=} [properties] Properties to set + */ + function DataAgentContext(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataAgentContext dataAgent. + * @member {string} dataAgent + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @instance + */ + DataAgentContext.prototype.dataAgent = ""; + + /** + * DataAgentContext credentials. + * @member {google.cloud.geminidataanalytics.v1alpha.ICredentials|null|undefined} credentials + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @instance + */ + DataAgentContext.prototype.credentials = null; + + /** + * DataAgentContext contextVersion. + * @member {google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion} contextVersion + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @instance + */ + DataAgentContext.prototype.contextVersion = 0; + + /** + * Creates a new DataAgentContext instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgentContext} DataAgentContext instance + */ + DataAgentContext.create = function create(properties) { + return new DataAgentContext(properties); + }; + + /** + * Encodes the specified DataAgentContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgentContext.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext} message DataAgentContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgentContext.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataAgent); + if (message.credentials != null && Object.hasOwnProperty.call(message, "credentials")) + $root.google.cloud.geminidataanalytics.v1alpha.Credentials.encode(message.credentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contextVersion != null && Object.hasOwnProperty.call(message, "contextVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextVersion); + return writer; + }; + + /** + * Encodes the specified DataAgentContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataAgentContext.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext} message DataAgentContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgentContext.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgentContext} DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgentContext.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataAgent = reader.string(); + break; + } + case 2: { + message.credentials = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.decode(reader, reader.uint32()); + break; + } + case 3: { + message.contextVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgentContext} DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgentContext.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAgentContext message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAgentContext.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + if (!$util.isString(message.dataAgent)) + return "dataAgent: string expected"; + if (message.credentials != null && message.hasOwnProperty("credentials")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.verify(message.credentials); + if (error) + return "credentials." + error; + } + if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) + switch (message.contextVersion) { + default: + return "contextVersion: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DataAgentContext message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DataAgentContext} DataAgentContext + */ + DataAgentContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext(); + if (object.dataAgent != null) + message.dataAgent = String(object.dataAgent); + if (object.credentials != null) { + if (typeof object.credentials !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataAgentContext.credentials: object expected"); + message.credentials = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.fromObject(object.credentials); + } + switch (object.contextVersion) { + default: + if (typeof object.contextVersion === "number") { + message.contextVersion = object.contextVersion; + break; + } + break; + case "CONTEXT_VERSION_UNSPECIFIED": + case 0: + message.contextVersion = 0; + break; + case "STAGING": + case 1: + message.contextVersion = 1; + break; + case "PUBLISHED": + case 2: + message.contextVersion = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataAgentContext message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentContext} message DataAgentContext + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAgentContext.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataAgent = ""; + object.credentials = null; + object.contextVersion = options.enums === String ? "CONTEXT_VERSION_UNSPECIFIED" : 0; + } + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + object.dataAgent = message.dataAgent; + if (message.credentials != null && message.hasOwnProperty("credentials")) + object.credentials = $root.google.cloud.geminidataanalytics.v1alpha.Credentials.toObject(message.credentials, options); + if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) + object.contextVersion = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion[message.contextVersion] === undefined ? message.contextVersion : $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion[message.contextVersion] : message.contextVersion; + return object; + }; + + /** + * Converts this DataAgentContext to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @instance + * @returns {Object.} JSON object + */ + DataAgentContext.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAgentContext + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DataAgentContext + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAgentContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DataAgentContext"; + }; + + /** + * ContextVersion enum. + * @name google.cloud.geminidataanalytics.v1alpha.DataAgentContext.ContextVersion + * @enum {number} + * @property {number} CONTEXT_VERSION_UNSPECIFIED=0 CONTEXT_VERSION_UNSPECIFIED value + * @property {number} STAGING=1 STAGING value + * @property {number} PUBLISHED=2 PUBLISHED value + */ + DataAgentContext.ContextVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTEXT_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "STAGING"] = 1; + values[valuesById[2] = "PUBLISHED"] = 2; + return values; + })(); + + return DataAgentContext; + })(); + + v1alpha.ConversationReference = (function() { + + /** + * Properties of a ConversationReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IConversationReference + * @property {string|null} [conversation] ConversationReference conversation + * @property {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null} [dataAgentContext] ConversationReference dataAgentContext + */ + + /** + * Constructs a new ConversationReference. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ConversationReference. + * @implements IConversationReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationReference=} [properties] Properties to set + */ + function ConversationReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationReference conversation. + * @member {string} conversation + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @instance + */ + ConversationReference.prototype.conversation = ""; + + /** + * ConversationReference dataAgentContext. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataAgentContext|null|undefined} dataAgentContext + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @instance + */ + ConversationReference.prototype.dataAgentContext = null; + + /** + * Creates a new ConversationReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationReference} ConversationReference instance + */ + ConversationReference.create = function create(properties) { + return new ConversationReference(properties); + }; + + /** + * Encodes the specified ConversationReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationReference} message ConversationReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); + if (message.dataAgentContext != null && Object.hasOwnProperty.call(message, "dataAgentContext")) + $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ConversationReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IConversationReference} message ConversationReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationReference} ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conversation = reader.string(); + break; + } + case 3: { + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationReference} ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.verify(message.dataAgentContext); + if (error) + return "dataAgentContext." + error; + } + return null; + }; + + /** + * Creates a ConversationReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ConversationReference} ConversationReference + */ + ConversationReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ConversationReference(); + if (object.conversation != null) + message.conversation = String(object.conversation); + if (object.dataAgentContext != null) { + if (typeof object.dataAgentContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ConversationReference.dataAgentContext: object expected"); + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.fromObject(object.dataAgentContext); + } + return message; + }; + + /** + * Creates a plain object from a ConversationReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ConversationReference} message ConversationReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversation = ""; + object.dataAgentContext = null; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) + object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1alpha.DataAgentContext.toObject(message.dataAgentContext, options); + return object; + }; + + /** + * Converts this ConversationReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @instance + * @returns {Object.} JSON object + */ + ConversationReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ConversationReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ConversationReference"; + }; + + return ConversationReference; + })(); + + v1alpha.Message = (function() { + + /** + * Properties of a Message. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IMessage + * @property {google.cloud.geminidataanalytics.v1alpha.IUserMessage|null} [userMessage] Message userMessage + * @property {google.cloud.geminidataanalytics.v1alpha.ISystemMessage|null} [systemMessage] Message systemMessage + * @property {google.protobuf.ITimestamp|null} [timestamp] Message timestamp + * @property {string|null} [messageId] Message messageId + */ + + /** + * Constructs a new Message. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Message. + * @implements IMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IMessage=} [properties] Properties to set + */ + function Message(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Message userMessage. + * @member {google.cloud.geminidataanalytics.v1alpha.IUserMessage|null|undefined} userMessage + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @instance + */ + Message.prototype.userMessage = null; + + /** + * Message systemMessage. + * @member {google.cloud.geminidataanalytics.v1alpha.ISystemMessage|null|undefined} systemMessage + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @instance + */ + Message.prototype.systemMessage = null; + + /** + * Message timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @instance + */ + Message.prototype.timestamp = null; + + /** + * Message messageId. + * @member {string} messageId + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @instance + */ + Message.prototype.messageId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Message kind. + * @member {"userMessage"|"systemMessage"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @instance + */ + Object.defineProperty(Message.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["userMessage", "systemMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Message instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Message} Message instance + */ + Message.create = function create(properties) { + return new Message(properties); + }; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Message.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userMessage != null && Object.hasOwnProperty.call(message, "userMessage")) + $root.google.cloud.geminidataanalytics.v1alpha.UserMessage.encode(message.userMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.systemMessage != null && Object.hasOwnProperty.call(message, "systemMessage")) + $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage.encode(message.systemMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.messageId); + return writer; + }; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Message.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Message message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Message(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.userMessage = $root.google.cloud.geminidataanalytics.v1alpha.UserMessage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.systemMessage = $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage.decode(reader, reader.uint32()); + break; + } + case 1: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.messageId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Message message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Message.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userMessage != null && message.hasOwnProperty("userMessage")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.UserMessage.verify(message.userMessage); + if (error) + return "userMessage." + error; + } + } + if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage.verify(message.systemMessage); + if (error) + return "systemMessage." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (!$util.isString(message.messageId)) + return "messageId: string expected"; + return null; + }; + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Message} Message + */ + Message.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Message) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Message(); + if (object.userMessage != null) { + if (typeof object.userMessage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Message.userMessage: object expected"); + message.userMessage = $root.google.cloud.geminidataanalytics.v1alpha.UserMessage.fromObject(object.userMessage); + } + if (object.systemMessage != null) { + if (typeof object.systemMessage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Message.systemMessage: object expected"); + message.systemMessage = $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage.fromObject(object.systemMessage); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.Message.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.messageId != null) + message.messageId = String(object.messageId); + return message; + }; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Message} message Message + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Message.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timestamp = null; + object.messageId = ""; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.userMessage != null && message.hasOwnProperty("userMessage")) { + object.userMessage = $root.google.cloud.geminidataanalytics.v1alpha.UserMessage.toObject(message.userMessage, options); + if (options.oneofs) + object.kind = "userMessage"; + } + if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { + object.systemMessage = $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage.toObject(message.systemMessage, options); + if (options.oneofs) + object.kind = "systemMessage"; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + object.messageId = message.messageId; + return object; + }; + + /** + * Converts this Message to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @instance + * @returns {Object.} JSON object + */ + Message.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Message + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Message + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Message"; + }; + + return Message; + })(); + + v1alpha.UserMessage = (function() { + + /** + * Properties of a UserMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IUserMessage + * @property {string|null} [text] UserMessage text + */ + + /** + * Constructs a new UserMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a UserMessage. + * @implements IUserMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IUserMessage=} [properties] Properties to set + */ + function UserMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserMessage text. + * @member {string|null|undefined} text + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @instance + */ + UserMessage.prototype.text = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UserMessage kind. + * @member {"text"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @instance + */ + Object.defineProperty(UserMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IUserMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.UserMessage} UserMessage instance + */ + UserMessage.create = function create(properties) { + return new UserMessage(properties); + }; + + /** + * Encodes the specified UserMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UserMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IUserMessage} message UserMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified UserMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.UserMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IUserMessage} message UserMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.UserMessage} UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.UserMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.UserMessage} UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.kind = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + return null; + }; + + /** + * Creates a UserMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.UserMessage} UserMessage + */ + UserMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.UserMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.UserMessage(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a UserMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.UserMessage} message UserMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.kind = "text"; + } + return object; + }; + + /** + * Converts this UserMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @instance + * @returns {Object.} JSON object + */ + UserMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.UserMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.UserMessage"; + }; + + return UserMessage; + })(); + + v1alpha.SystemMessage = (function() { + + /** + * Properties of a SystemMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ISystemMessage + * @property {google.cloud.geminidataanalytics.v1alpha.ITextMessage|null} [text] SystemMessage text + * @property {google.cloud.geminidataanalytics.v1alpha.ISchemaMessage|null} [schema] SystemMessage schema + * @property {google.cloud.geminidataanalytics.v1alpha.IDataMessage|null} [data] SystemMessage data + * @property {google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage|null} [analysis] SystemMessage analysis + * @property {google.cloud.geminidataanalytics.v1alpha.IChartMessage|null} [chart] SystemMessage chart + * @property {google.cloud.geminidataanalytics.v1alpha.IErrorMessage|null} [error] SystemMessage error + * @property {google.cloud.geminidataanalytics.v1alpha.IExampleQueries|null} [exampleQueries] SystemMessage exampleQueries + * @property {number|null} [groupId] SystemMessage groupId + */ + + /** + * Constructs a new SystemMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a SystemMessage. + * @implements ISystemMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ISystemMessage=} [properties] Properties to set + */ + function SystemMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemMessage text. + * @member {google.cloud.geminidataanalytics.v1alpha.ITextMessage|null|undefined} text + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.text = null; + + /** + * SystemMessage schema. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchemaMessage|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.schema = null; + + /** + * SystemMessage data. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataMessage|null|undefined} data + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.data = null; + + /** + * SystemMessage analysis. + * @member {google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage|null|undefined} analysis + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.analysis = null; + + /** + * SystemMessage chart. + * @member {google.cloud.geminidataanalytics.v1alpha.IChartMessage|null|undefined} chart + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.chart = null; + + /** + * SystemMessage error. + * @member {google.cloud.geminidataanalytics.v1alpha.IErrorMessage|null|undefined} error + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.error = null; + + /** + * SystemMessage exampleQueries. + * @member {google.cloud.geminidataanalytics.v1alpha.IExampleQueries|null|undefined} exampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.exampleQueries = null; + + /** + * SystemMessage groupId. + * @member {number|null|undefined} groupId + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.groupId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SystemMessage kind. + * @member {"text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + Object.defineProperty(SystemMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["text", "schema", "data", "analysis", "chart", "error", "exampleQueries"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SystemMessage.prototype, "_groupId", { + get: $util.oneOfGetter($oneOfFields = ["groupId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SystemMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISystemMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.SystemMessage} SystemMessage instance + */ + SystemMessage.create = function create(properties) { + return new SystemMessage(properties); + }; + + /** + * Encodes the specified SystemMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SystemMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISystemMessage} message SystemMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.google.cloud.geminidataanalytics.v1alpha.DataMessage.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) + $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.encode(message.analysis, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.chart != null && Object.hasOwnProperty.call(message, "chart")) + $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage.encode(message.chart, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage.encode(message.error, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.groupId); + if (message.exampleQueries != null && Object.hasOwnProperty.call(message, "exampleQueries")) + $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.encode(message.exampleQueries, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SystemMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISystemMessage} message SystemMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.SystemMessage} SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.data = $root.google.cloud.geminidataanalytics.v1alpha.DataMessage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.analysis = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.decode(reader, reader.uint32()); + break; + } + case 5: { + message.chart = $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage.decode(reader, reader.uint32()); + break; + } + case 6: { + message.error = $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage.decode(reader, reader.uint32()); + break; + } + case 13: { + message.exampleQueries = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.decode(reader, reader.uint32()); + break; + } + case 12: { + message.groupId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SystemMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.SystemMessage} SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.verify(message.text); + if (error) + return "text." + error; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage.verify(message.schema); + if (error) + return "schema." + error; + } + } + if (message.data != null && message.hasOwnProperty("data")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataMessage.verify(message.data); + if (error) + return "data." + error; + } + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.verify(message.analysis); + if (error) + return "analysis." + error; + } + } + if (message.chart != null && message.hasOwnProperty("chart")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage.verify(message.chart); + if (error) + return "chart." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify(message.exampleQueries); + if (error) + return "exampleQueries." + error; + } + } + if (message.groupId != null && message.hasOwnProperty("groupId")) { + properties._groupId = 1; + if (!$util.isInteger(message.groupId)) + return "groupId: integer expected"; + } + return null; + }; + + /** + * Creates a SystemMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.SystemMessage} SystemMessage + */ + SystemMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.SystemMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.text: object expected"); + message.text = $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.fromObject(object.text); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage.fromObject(object.schema); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.data: object expected"); + message.data = $root.google.cloud.geminidataanalytics.v1alpha.DataMessage.fromObject(object.data); + } + if (object.analysis != null) { + if (typeof object.analysis !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.analysis: object expected"); + message.analysis = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.fromObject(object.analysis); + } + if (object.chart != null) { + if (typeof object.chart !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.chart: object expected"); + message.chart = $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage.fromObject(object.chart); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.error: object expected"); + message.error = $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage.fromObject(object.error); + } + if (object.exampleQueries != null) { + if (typeof object.exampleQueries !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.exampleQueries: object expected"); + message.exampleQueries = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.fromObject(object.exampleQueries); + } + if (object.groupId != null) + message.groupId = object.groupId | 0; + return message; + }; + + /** + * Creates a plain object from a SystemMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.SystemMessage} message SystemMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.toObject(message.text, options); + if (options.oneofs) + object.kind = "text"; + } + if (message.schema != null && message.hasOwnProperty("schema")) { + object.schema = $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage.toObject(message.schema, options); + if (options.oneofs) + object.kind = "schema"; + } + if (message.data != null && message.hasOwnProperty("data")) { + object.data = $root.google.cloud.geminidataanalytics.v1alpha.DataMessage.toObject(message.data, options); + if (options.oneofs) + object.kind = "data"; + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + object.analysis = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.toObject(message.analysis, options); + if (options.oneofs) + object.kind = "analysis"; + } + if (message.chart != null && message.hasOwnProperty("chart")) { + object.chart = $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage.toObject(message.chart, options); + if (options.oneofs) + object.kind = "chart"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage.toObject(message.error, options); + if (options.oneofs) + object.kind = "error"; + } + if (message.groupId != null && message.hasOwnProperty("groupId")) { + object.groupId = message.groupId; + if (options.oneofs) + object._groupId = "groupId"; + } + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + object.exampleQueries = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.toObject(message.exampleQueries, options); + if (options.oneofs) + object.kind = "exampleQueries"; + } + return object; + }; + + /** + * Converts this SystemMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + * @returns {Object.} JSON object + */ + SystemMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SystemMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.SystemMessage"; + }; + + return SystemMessage; + })(); + + v1alpha.TextMessage = (function() { + + /** + * Properties of a TextMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ITextMessage + * @property {Array.|null} [parts] TextMessage parts + * @property {google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|null} [textType] TextMessage textType + */ + + /** + * Constructs a new TextMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a TextMessage. + * @implements ITextMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ITextMessage=} [properties] Properties to set + */ + function TextMessage(properties) { + this.parts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextMessage parts. + * @member {Array.} parts + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @instance + */ + TextMessage.prototype.parts = $util.emptyArray; + + /** + * TextMessage textType. + * @member {google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType} textType + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @instance + */ + TextMessage.prototype.textType = 0; + + /** + * Creates a new TextMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ITextMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.TextMessage} TextMessage instance + */ + TextMessage.create = function create(properties) { + return new TextMessage(properties); + }; + + /** + * Encodes the specified TextMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.TextMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ITextMessage} message TextMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parts[i]); + if (message.textType != null && Object.hasOwnProperty.call(message, "textType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.textType); + return writer; + }; + + /** + * Encodes the specified TextMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.TextMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ITextMessage} message TextMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.TextMessage} TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.TextMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push(reader.string()); + break; + } + case 2: { + message.textType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.TextMessage} TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) + if (!$util.isString(message.parts[i])) + return "parts: string[] expected"; + } + if (message.textType != null && message.hasOwnProperty("textType")) + switch (message.textType) { + default: + return "textType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a TextMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.TextMessage} TextMessage + */ + TextMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.TextMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.TextMessage(); + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.TextMessage.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) + message.parts[i] = String(object.parts[i]); + } + switch (object.textType) { + default: + if (typeof object.textType === "number") { + message.textType = object.textType; + break; + } + break; + case "TEXT_TYPE_UNSPECIFIED": + case 0: + message.textType = 0; + break; + case "FINAL_RESPONSE": + case 1: + message.textType = 1; + break; + case "THOUGHT": + case 2: + message.textType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a TextMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.TextMessage} message TextMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parts = []; + if (options.defaults) + object.textType = options.enums === String ? "TEXT_TYPE_UNSPECIFIED" : 0; + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = message.parts[j]; + } + if (message.textType != null && message.hasOwnProperty("textType")) + object.textType = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType[message.textType] === undefined ? message.textType : $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType[message.textType] : message.textType; + return object; + }; + + /** + * Converts this TextMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @instance + * @returns {Object.} JSON object + */ + TextMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TextMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.TextMessage"; + }; + + /** + * TextType enum. + * @name google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType + * @enum {number} + * @property {number} TEXT_TYPE_UNSPECIFIED=0 TEXT_TYPE_UNSPECIFIED value + * @property {number} FINAL_RESPONSE=1 FINAL_RESPONSE value + * @property {number} THOUGHT=2 THOUGHT value + */ + TextMessage.TextType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEXT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FINAL_RESPONSE"] = 1; + values[valuesById[2] = "THOUGHT"] = 2; + return values; + })(); + + return TextMessage; + })(); + + v1alpha.SchemaMessage = (function() { + + /** + * Properties of a SchemaMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ISchemaMessage + * @property {google.cloud.geminidataanalytics.v1alpha.ISchemaQuery|null} [query] SchemaMessage query + * @property {google.cloud.geminidataanalytics.v1alpha.ISchemaResult|null} [result] SchemaMessage result + */ + + /** + * Constructs a new SchemaMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a SchemaMessage. + * @implements ISchemaMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaMessage=} [properties] Properties to set + */ + function SchemaMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaMessage query. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchemaQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @instance + */ + SchemaMessage.prototype.query = null; + + /** + * SchemaMessage result. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchemaResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @instance + */ + SchemaMessage.prototype.result = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchemaMessage kind. + * @member {"query"|"result"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @instance + */ + Object.defineProperty(SchemaMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "result"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchemaMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaMessage} SchemaMessage instance + */ + SchemaMessage.create = function create(properties) { + return new SchemaMessage(properties); + }; + + /** + * Encodes the specified SchemaMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaMessage} message SchemaMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaMessage} message SchemaMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaMessage} SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaMessage} SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult.verify(message.result); + if (error) + return "result." + error; + } + } + return null; + }; + + /** + * Creates a SchemaMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaMessage} SchemaMessage + */ + SchemaMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.SchemaMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SchemaMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery.fromObject(object.query); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SchemaMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a SchemaMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.SchemaMessage} message SchemaMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; + } + return object; + }; + + /** + * Converts this SchemaMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @instance + * @returns {Object.} JSON object + */ + SchemaMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.SchemaMessage"; + }; + + return SchemaMessage; + })(); + + v1alpha.SchemaQuery = (function() { + + /** + * Properties of a SchemaQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ISchemaQuery + * @property {string|null} [question] SchemaQuery question + */ + + /** + * Constructs a new SchemaQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a SchemaQuery. + * @implements ISchemaQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaQuery=} [properties] Properties to set + */ + function SchemaQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @instance + */ + SchemaQuery.prototype.question = ""; + + /** + * Creates a new SchemaQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaQuery} SchemaQuery instance + */ + SchemaQuery.create = function create(properties) { + return new SchemaQuery(properties); + }; + + /** + * Encodes the specified SchemaQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaQuery} message SchemaQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + return writer; + }; + + /** + * Encodes the specified SchemaQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaQuery} message SchemaQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaQuery} SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaQuery} SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + return null; + }; + + /** + * Creates a SchemaQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaQuery} SchemaQuery + */ + SchemaQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.SchemaQuery(); + if (object.question != null) + message.question = String(object.question); + return message; + }; + + /** + * Creates a plain object from a SchemaQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.SchemaQuery} message SchemaQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.question = ""; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + return object; + }; + + /** + * Converts this SchemaQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @instance + * @returns {Object.} JSON object + */ + SchemaQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.SchemaQuery"; + }; + + return SchemaQuery; + })(); + + v1alpha.SchemaResult = (function() { + + /** + * Properties of a SchemaResult. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ISchemaResult + * @property {Array.|null} [datasources] SchemaResult datasources + */ + + /** + * Constructs a new SchemaResult. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a SchemaResult. + * @implements ISchemaResult + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaResult=} [properties] Properties to set + */ + function SchemaResult(properties) { + this.datasources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaResult datasources. + * @member {Array.} datasources + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @instance + */ + SchemaResult.prototype.datasources = $util.emptyArray; + + /** + * Creates a new SchemaResult instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaResult} SchemaResult instance + */ + SchemaResult.create = function create(properties) { + return new SchemaResult(properties); + }; + + /** + * Encodes the specified SchemaResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaResult} message SchemaResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasources != null && message.datasources.length) + for (var i = 0; i < message.datasources.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.Datasource.encode(message.datasources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.SchemaResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ISchemaResult} message SchemaResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaResult} SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.datasources && message.datasources.length)) + message.datasources = []; + message.datasources.push($root.google.cloud.geminidataanalytics.v1alpha.Datasource.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaResult} SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaResult message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasources != null && message.hasOwnProperty("datasources")) { + if (!Array.isArray(message.datasources)) + return "datasources: array expected"; + for (var i = 0; i < message.datasources.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Datasource.verify(message.datasources[i]); + if (error) + return "datasources." + error; + } + } + return null; + }; + + /** + * Creates a SchemaResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.SchemaResult} SchemaResult + */ + SchemaResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.SchemaResult(); + if (object.datasources) { + if (!Array.isArray(object.datasources)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SchemaResult.datasources: array expected"); + message.datasources = []; + for (var i = 0; i < object.datasources.length; ++i) { + if (typeof object.datasources[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SchemaResult.datasources: object expected"); + message.datasources[i] = $root.google.cloud.geminidataanalytics.v1alpha.Datasource.fromObject(object.datasources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.SchemaResult} message SchemaResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datasources = []; + if (message.datasources && message.datasources.length) { + object.datasources = []; + for (var j = 0; j < message.datasources.length; ++j) + object.datasources[j] = $root.google.cloud.geminidataanalytics.v1alpha.Datasource.toObject(message.datasources[j], options); + } + return object; + }; + + /** + * Converts this SchemaResult to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @instance + * @returns {Object.} JSON object + */ + SchemaResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaResult + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.SchemaResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.SchemaResult"; + }; + + return SchemaResult; + })(); + + v1alpha.DataMessage = (function() { + + /** + * Properties of a DataMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDataMessage + * @property {google.cloud.geminidataanalytics.v1alpha.IDataQuery|null} [query] DataMessage query + * @property {string|null} [generatedSql] DataMessage generatedSql + * @property {google.cloud.geminidataanalytics.v1alpha.IDataResult|null} [result] DataMessage result + * @property {google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null} [generatedLookerQuery] DataMessage generatedLookerQuery + * @property {google.cloud.geminidataanalytics.v1alpha.IBigQueryJob|null} [bigQueryJob] DataMessage bigQueryJob + */ + + /** + * Constructs a new DataMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataMessage. + * @implements IDataMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDataMessage=} [properties] Properties to set + */ + function DataMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataMessage query. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @instance + */ + DataMessage.prototype.query = null; + + /** + * DataMessage generatedSql. + * @member {string|null|undefined} generatedSql + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @instance + */ + DataMessage.prototype.generatedSql = null; + + /** + * DataMessage result. + * @member {google.cloud.geminidataanalytics.v1alpha.IDataResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @instance + */ + DataMessage.prototype.result = null; + + /** + * DataMessage generatedLookerQuery. + * @member {google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null|undefined} generatedLookerQuery + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @instance + */ + DataMessage.prototype.generatedLookerQuery = null; + + /** + * DataMessage bigQueryJob. + * @member {google.cloud.geminidataanalytics.v1alpha.IBigQueryJob|null|undefined} bigQueryJob + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @instance + */ + DataMessage.prototype.bigQueryJob = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataMessage kind. + * @member {"query"|"generatedSql"|"result"|"generatedLookerQuery"|"bigQueryJob"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @instance + */ + Object.defineProperty(DataMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "generatedSql", "result", "generatedLookerQuery", "bigQueryJob"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DataMessage} DataMessage instance + */ + DataMessage.create = function create(properties) { + return new DataMessage(properties); + }; + + /** + * Encodes the specified DataMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataMessage} message DataMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1alpha.DataQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generatedSql != null && Object.hasOwnProperty.call(message, "generatedSql")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.generatedSql); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1alpha.DataResult.encode(message.result, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.generatedLookerQuery != null && Object.hasOwnProperty.call(message, "generatedLookerQuery")) + $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.encode(message.generatedLookerQuery, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bigQueryJob != null && Object.hasOwnProperty.call(message, "bigQueryJob")) + $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob.encode(message.bigQueryJob, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataMessage} message DataMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DataMessage} DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DataMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1alpha.DataQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.generatedSql = reader.string(); + break; + } + case 3: { + message.result = $root.google.cloud.geminidataanalytics.v1alpha.DataResult.decode(reader, reader.uint32()); + break; + } + case 4: { + message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.decode(reader, reader.uint32()); + break; + } + case 5: { + message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DataMessage} DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.generatedSql)) + return "generatedSql: string expected"; + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.DataResult.verify(message.result); + if (error) + return "result." + error; + } + } + if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.verify(message.generatedLookerQuery); + if (error) + return "generatedLookerQuery." + error; + } + } + if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob.verify(message.bigQueryJob); + if (error) + return "bigQueryJob." + error; + } + } + return null; + }; + + /** + * Creates a DataMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DataMessage} DataMessage + */ + DataMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DataMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DataMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1alpha.DataQuery.fromObject(object.query); + } + if (object.generatedSql != null) + message.generatedSql = String(object.generatedSql); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1alpha.DataResult.fromObject(object.result); + } + if (object.generatedLookerQuery != null) { + if (typeof object.generatedLookerQuery !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataMessage.generatedLookerQuery: object expected"); + message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.fromObject(object.generatedLookerQuery); + } + if (object.bigQueryJob != null) { + if (typeof object.bigQueryJob !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataMessage.bigQueryJob: object expected"); + message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob.fromObject(object.bigQueryJob); + } + return message; + }; + + /** + * Creates a plain object from a DataMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DataMessage} message DataMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1alpha.DataQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { + object.generatedSql = message.generatedSql; + if (options.oneofs) + object.kind = "generatedSql"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1alpha.DataResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; + } + if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { + object.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.toObject(message.generatedLookerQuery, options); + if (options.oneofs) + object.kind = "generatedLookerQuery"; + } + if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { + object.bigQueryJob = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob.toObject(message.bigQueryJob, options); + if (options.oneofs) + object.kind = "bigQueryJob"; + } + return object; + }; + + /** + * Converts this DataMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @instance + * @returns {Object.} JSON object + */ + DataMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DataMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DataMessage"; + }; + + return DataMessage; + })(); + + v1alpha.LookerQuery = (function() { + + /** + * Properties of a LookerQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface ILookerQuery + * @property {string|null} [model] LookerQuery model + * @property {string|null} [explore] LookerQuery explore + * @property {Array.|null} [fields] LookerQuery fields + * @property {Array.|null} [filters] LookerQuery filters + * @property {Array.|null} [sorts] LookerQuery sorts + * @property {string|null} [limit] LookerQuery limit + */ + + /** + * Constructs a new LookerQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a LookerQuery. + * @implements ILookerQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerQuery=} [properties] Properties to set + */ + function LookerQuery(properties) { + this.fields = []; + this.filters = []; + this.sorts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerQuery model. + * @member {string} model + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @instance + */ + LookerQuery.prototype.model = ""; + + /** + * LookerQuery explore. + * @member {string} explore + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @instance + */ + LookerQuery.prototype.explore = ""; + + /** + * LookerQuery fields. + * @member {Array.} fields + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @instance + */ + LookerQuery.prototype.fields = $util.emptyArray; + + /** + * LookerQuery filters. + * @member {Array.} filters + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @instance + */ + LookerQuery.prototype.filters = $util.emptyArray; + + /** + * LookerQuery sorts. + * @member {Array.} sorts + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @instance + */ + LookerQuery.prototype.sorts = $util.emptyArray; + + /** + * LookerQuery limit. + * @member {string|null|undefined} limit + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @instance + */ + LookerQuery.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LookerQuery.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LookerQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery} LookerQuery instance + */ + LookerQuery.create = function create(properties) { + return new LookerQuery(properties); + }; + + /** + * Encodes the specified LookerQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerQuery} message LookerQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.explore != null && Object.hasOwnProperty.call(message, "explore")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explore); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fields[i]); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.encode(message.filters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sorts != null && message.sorts.length) + for (var i = 0; i < message.sorts.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sorts[i]); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.limit); + return writer; + }; + + /** + * Encodes the specified LookerQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ILookerQuery} message LookerQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery} LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.explore = reader.string(); + break; + } + case 3: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push(reader.string()); + break; + } + case 4: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.sorts && message.sorts.length)) + message.sorts = []; + message.sorts.push(reader.string()); + break; + } + case 6: { + message.limit = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery} LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.explore != null && message.hasOwnProperty("explore")) + if (!$util.isString(message.explore)) + return "explore: string 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) + if (!$util.isString(message.fields[i])) + return "fields: string[] expected"; + } + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + if (message.sorts != null && message.hasOwnProperty("sorts")) { + if (!Array.isArray(message.sorts)) + return "sorts: array expected"; + for (var i = 0; i < message.sorts.length; ++i) + if (!$util.isString(message.sorts[i])) + return "sorts: string[] expected"; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isString(message.limit)) + return "limit: string expected"; + } + return null; + }; + + /** + * Creates a LookerQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery} LookerQuery + */ + LookerQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery(); + if (object.model != null) + message.model = String(object.model); + if (object.explore != null) + message.explore = String(object.explore); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerQuery.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) + message.fields[i] = String(object.fields[i]); + } + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerQuery.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerQuery.filters: object expected"); + message.filters[i] = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.fromObject(object.filters[i]); + } + } + if (object.sorts) { + if (!Array.isArray(object.sorts)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.LookerQuery.sorts: array expected"); + message.sorts = []; + for (var i = 0; i < object.sorts.length; ++i) + message.sorts[i] = String(object.sorts[i]); + } + if (object.limit != null) + message.limit = String(object.limit); + return message; + }; + + /** + * Creates a plain object from a LookerQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.LookerQuery} message LookerQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.filters = []; + object.sorts = []; + } + if (options.defaults) { + object.model = ""; + object.explore = ""; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.explore != null && message.hasOwnProperty("explore")) + object.explore = message.explore; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = message.fields[j]; + } + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.toObject(message.filters[j], options); + } + if (message.sorts && message.sorts.length) { + object.sorts = []; + for (var j = 0; j < message.sorts.length; ++j) + object.sorts[j] = message.sorts[j]; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + object.limit = message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this LookerQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @instance + * @returns {Object.} JSON object + */ + LookerQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.LookerQuery"; + }; + + LookerQuery.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @interface IFilter + * @property {string|null} [field] Filter field + * @property {string|null} [value] Filter value + */ + + /** + * Constructs a new Filter. + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter=} [properties] Properties to set + */ + function Filter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Filter field. + * @member {string} field + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @instance + */ + Filter.prototype.field = ""; + + /** + * Filter value. + * @member {string} value + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @instance + */ + Filter.prototype.value = ""; + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.LookerQuery.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter(); + if (object.field != null) + message.field = String(object.field); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.value = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.LookerQuery.Filter"; + }; + + return Filter; + })(); + + return LookerQuery; + })(); + + v1alpha.DataQuery = (function() { + + /** + * Properties of a DataQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDataQuery + * @property {google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null} [looker] DataQuery looker + * @property {string|null} [question] DataQuery question + * @property {string|null} [name] DataQuery name + * @property {Array.|null} [datasources] DataQuery datasources + */ + + /** + * Constructs a new DataQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataQuery. + * @implements IDataQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDataQuery=} [properties] Properties to set + */ + function DataQuery(properties) { + this.datasources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQuery looker. + * @member {google.cloud.geminidataanalytics.v1alpha.ILookerQuery|null|undefined} looker + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @instance + */ + DataQuery.prototype.looker = null; + + /** + * DataQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @instance + */ + DataQuery.prototype.question = ""; + + /** + * DataQuery name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @instance + */ + DataQuery.prototype.name = ""; + + /** + * DataQuery datasources. + * @member {Array.} datasources + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @instance + */ + DataQuery.prototype.datasources = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataQuery queryType. + * @member {"looker"|undefined} queryType + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @instance + */ + Object.defineProperty(DataQuery.prototype, "queryType", { + get: $util.oneOfGetter($oneOfFields = ["looker"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DataQuery} DataQuery instance + */ + DataQuery.create = function create(properties) { + return new DataQuery(properties); + }; + + /** + * Encodes the specified DataQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataQuery} message DataQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.datasources != null && message.datasources.length) + for (var i = 0; i < message.datasources.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.Datasource.encode(message.datasources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.looker != null && Object.hasOwnProperty.call(message, "looker")) + $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.encode(message.looker, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataQuery} message DataQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DataQuery} DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DataQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.looker = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.decode(reader, reader.uint32()); + break; + } + case 1: { + message.question = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.datasources && message.datasources.length)) + message.datasources = []; + message.datasources.push($root.google.cloud.geminidataanalytics.v1alpha.Datasource.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DataQuery} DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.looker != null && message.hasOwnProperty("looker")) { + properties.queryType = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.verify(message.looker); + if (error) + return "looker." + error; + } + } + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.datasources != null && message.hasOwnProperty("datasources")) { + if (!Array.isArray(message.datasources)) + return "datasources: array expected"; + for (var i = 0; i < message.datasources.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Datasource.verify(message.datasources[i]); + if (error) + return "datasources." + error; + } + } + return null; + }; + + /** + * Creates a DataQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DataQuery} DataQuery + */ + DataQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DataQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DataQuery(); + if (object.looker != null) { + if (typeof object.looker !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataQuery.looker: object expected"); + message.looker = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.fromObject(object.looker); + } + if (object.question != null) + message.question = String(object.question); + if (object.name != null) + message.name = String(object.name); + if (object.datasources) { + if (!Array.isArray(object.datasources)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataQuery.datasources: array expected"); + message.datasources = []; + for (var i = 0; i < object.datasources.length; ++i) { + if (typeof object.datasources[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataQuery.datasources: object expected"); + message.datasources[i] = $root.google.cloud.geminidataanalytics.v1alpha.Datasource.fromObject(object.datasources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DataQuery} message DataQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datasources = []; + if (options.defaults) { + object.question = ""; + object.name = ""; + } + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.datasources && message.datasources.length) { + object.datasources = []; + for (var j = 0; j < message.datasources.length; ++j) + object.datasources[j] = $root.google.cloud.geminidataanalytics.v1alpha.Datasource.toObject(message.datasources[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.looker != null && message.hasOwnProperty("looker")) { + object.looker = $root.google.cloud.geminidataanalytics.v1alpha.LookerQuery.toObject(message.looker, options); + if (options.oneofs) + object.queryType = "looker"; + } + return object; + }; + + /** + * Converts this DataQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @instance + * @returns {Object.} JSON object + */ + DataQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DataQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DataQuery"; + }; + + return DataQuery; + })(); + + v1alpha.DataResult = (function() { + + /** + * Properties of a DataResult. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IDataResult + * @property {string|null} [name] DataResult name + * @property {google.cloud.geminidataanalytics.v1alpha.ISchema|null} [schema] DataResult schema + * @property {Array.|null} [data] DataResult data + */ + + /** + * Constructs a new DataResult. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a DataResult. + * @implements IDataResult + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IDataResult=} [properties] Properties to set + */ + function DataResult(properties) { + this.data = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataResult name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @instance + */ + DataResult.prototype.name = ""; + + /** + * DataResult schema. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @instance + */ + DataResult.prototype.schema = null; + + /** + * DataResult data. + * @member {Array.} data + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @instance + */ + DataResult.prototype.data = $util.emptyArray; + + /** + * Creates a new DataResult instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.DataResult} DataResult instance + */ + DataResult.create = function create(properties) { + return new DataResult(properties); + }; + + /** + * Encodes the specified DataResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataResult} message DataResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && message.data.length) + for (var i = 0; i < message.data.length; ++i) + $root.google.protobuf.Struct.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1alpha.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.DataResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IDataResult} message DataResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.DataResult} DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.DataResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.name = reader.string(); + break; + } + case 5: { + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.DataResult} DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataResult message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataResult.verify = function verify(message) { + if (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.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (var i = 0; i < message.data.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a DataResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.DataResult} DataResult + */ + DataResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.DataResult) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.DataResult(); + if (object.name != null) + message.name = String(object.name); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataResult.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.fromObject(object.schema); + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataResult.data: array expected"); + message.data = []; + for (var i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataResult.data: object expected"); + message.data[i] = $root.google.protobuf.Struct.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.DataResult} message DataResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) { + object.name = ""; + object.schema = null; + } + if (message.data && message.data.length) { + object.data = []; + for (var j = 0; j < message.data.length; ++j) + object.data[j] = $root.google.protobuf.Struct.toObject(message.data[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this DataResult to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @instance + * @returns {Object.} JSON object + */ + DataResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataResult + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.DataResult"; + }; + + return DataResult; + })(); + + v1alpha.BigQueryJob = (function() { + + /** + * Properties of a BigQueryJob. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IBigQueryJob + * @property {string|null} [projectId] BigQueryJob projectId + * @property {string|null} [jobId] BigQueryJob jobId + * @property {string|null} [location] BigQueryJob location + * @property {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null} [destinationTable] BigQueryJob destinationTable + * @property {google.cloud.geminidataanalytics.v1alpha.ISchema|null} [schema] BigQueryJob schema + */ + + /** + * Constructs a new BigQueryJob. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a BigQueryJob. + * @implements IBigQueryJob + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryJob=} [properties] Properties to set + */ + function BigQueryJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryJob projectId. + * @member {string} projectId + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @instance + */ + BigQueryJob.prototype.projectId = ""; + + /** + * BigQueryJob jobId. + * @member {string} jobId + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @instance + */ + BigQueryJob.prototype.jobId = ""; + + /** + * BigQueryJob location. + * @member {string} location + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @instance + */ + BigQueryJob.prototype.location = ""; + + /** + * BigQueryJob destinationTable. + * @member {google.cloud.geminidataanalytics.v1alpha.IBigQueryTableReference|null|undefined} destinationTable + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @instance + */ + BigQueryJob.prototype.destinationTable = null; + + /** + * BigQueryJob schema. + * @member {google.cloud.geminidataanalytics.v1alpha.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @instance + */ + BigQueryJob.prototype.schema = null; + + /** + * Creates a new BigQueryJob instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryJob=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryJob} BigQueryJob instance + */ + BigQueryJob.create = function create(properties) { + return new BigQueryJob(properties); + }; + + /** + * Encodes the specified BigQueryJob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryJob} message BigQueryJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.destinationTable != null && Object.hasOwnProperty.call(message, "destinationTable")) + $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.encode(message.destinationTable, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.location); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1alpha.Schema.encode(message.schema, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryJob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.BigQueryJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBigQueryJob} message BigQueryJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryJob} BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryJob.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 5: { + message.location = reader.string(); + break; + } + case 3: { + message.destinationTable = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.decode(reader, reader.uint32()); + break; + } + case 7: { + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryJob} BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryJob message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.verify(message.destinationTable); + if (error) + return "destinationTable." + error; + } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a BigQueryJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.BigQueryJob} BigQueryJob + */ + BigQueryJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.BigQueryJob(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.location != null) + message.location = String(object.location); + if (object.destinationTable != null) { + if (typeof object.destinationTable !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.BigQueryJob.destinationTable: object expected"); + message.destinationTable = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.fromObject(object.destinationTable); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.BigQueryJob.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.BigQueryJob} message BigQueryJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.jobId = ""; + object.destinationTable = null; + object.location = ""; + object.schema = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) + object.destinationTable = $root.google.cloud.geminidataanalytics.v1alpha.BigQueryTableReference.toObject(message.destinationTable, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this BigQueryJob to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @instance + * @returns {Object.} JSON object + */ + BigQueryJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryJob + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.BigQueryJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.BigQueryJob"; + }; + + return BigQueryJob; + })(); + + v1alpha.AnalysisMessage = (function() { + + /** + * Properties of an AnalysisMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IAnalysisMessage + * @property {google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery|null} [query] AnalysisMessage query + * @property {google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent|null} [progressEvent] AnalysisMessage progressEvent + */ + + /** + * Constructs a new AnalysisMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an AnalysisMessage. + * @implements IAnalysisMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage=} [properties] Properties to set + */ + function AnalysisMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisMessage query. + * @member {google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @instance + */ + AnalysisMessage.prototype.query = null; + + /** + * AnalysisMessage progressEvent. + * @member {google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent|null|undefined} progressEvent + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @instance + */ + AnalysisMessage.prototype.progressEvent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalysisMessage kind. + * @member {"query"|"progressEvent"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @instance + */ + Object.defineProperty(AnalysisMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "progressEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalysisMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisMessage} AnalysisMessage instance + */ + AnalysisMessage.create = function create(properties) { + return new AnalysisMessage(properties); + }; + + /** + * Encodes the specified AnalysisMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage} message AnalysisMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.progressEvent != null && Object.hasOwnProperty.call(message, "progressEvent")) + $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.encode(message.progressEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalysisMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisMessage} message AnalysisMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisMessage} AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.progressEvent = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisMessage} AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.verify(message.progressEvent); + if (error) + return "progressEvent." + error; + } + } + return null; + }; + + /** + * Creates an AnalysisMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisMessage} AnalysisMessage + */ + AnalysisMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.fromObject(object.query); + } + if (object.progressEvent != null) { + if (typeof object.progressEvent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.AnalysisMessage.progressEvent: object expected"); + message.progressEvent = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.fromObject(object.progressEvent); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisMessage} message AnalysisMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { + object.progressEvent = $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.toObject(message.progressEvent, options); + if (options.oneofs) + object.kind = "progressEvent"; + } + return object; + }; + + /** + * Converts this AnalysisMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @instance + * @returns {Object.} JSON object + */ + AnalysisMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.AnalysisMessage"; + }; + + return AnalysisMessage; + })(); + + v1alpha.AnalysisQuery = (function() { + + /** + * Properties of an AnalysisQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IAnalysisQuery + * @property {string|null} [question] AnalysisQuery question + * @property {Array.|null} [dataResultNames] AnalysisQuery dataResultNames + */ + + /** + * Constructs a new AnalysisQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an AnalysisQuery. + * @implements IAnalysisQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery=} [properties] Properties to set + */ + function AnalysisQuery(properties) { + this.dataResultNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @instance + */ + AnalysisQuery.prototype.question = ""; + + /** + * AnalysisQuery dataResultNames. + * @member {Array.} dataResultNames + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @instance + */ + AnalysisQuery.prototype.dataResultNames = $util.emptyArray; + + /** + * Creates a new AnalysisQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisQuery} AnalysisQuery instance + */ + AnalysisQuery.create = function create(properties) { + return new AnalysisQuery(properties); + }; + + /** + * Encodes the specified AnalysisQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery} message AnalysisQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.dataResultNames != null && message.dataResultNames.length) + for (var i = 0; i < message.dataResultNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultNames[i]); + return writer; + }; + + /** + * Encodes the specified AnalysisQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisQuery} message AnalysisQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisQuery} AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } + case 2: { + if (!(message.dataResultNames && message.dataResultNames.length)) + message.dataResultNames = []; + message.dataResultNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisQuery} AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.dataResultNames != null && message.hasOwnProperty("dataResultNames")) { + if (!Array.isArray(message.dataResultNames)) + return "dataResultNames: array expected"; + for (var i = 0; i < message.dataResultNames.length; ++i) + if (!$util.isString(message.dataResultNames[i])) + return "dataResultNames: string[] expected"; + } + return null; + }; + + /** + * Creates an AnalysisQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisQuery} AnalysisQuery + */ + AnalysisQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisQuery(); + if (object.question != null) + message.question = String(object.question); + if (object.dataResultNames) { + if (!Array.isArray(object.dataResultNames)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.AnalysisQuery.dataResultNames: array expected"); + message.dataResultNames = []; + for (var i = 0; i < object.dataResultNames.length; ++i) + message.dataResultNames[i] = String(object.dataResultNames[i]); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisQuery} message AnalysisQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataResultNames = []; + if (options.defaults) + object.question = ""; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.dataResultNames && message.dataResultNames.length) { + object.dataResultNames = []; + for (var j = 0; j < message.dataResultNames.length; ++j) + object.dataResultNames[j] = message.dataResultNames[j]; + } + return object; + }; + + /** + * Converts this AnalysisQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @instance + * @returns {Object.} JSON object + */ + AnalysisQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.AnalysisQuery"; + }; + + return AnalysisQuery; + })(); + + v1alpha.AnalysisEvent = (function() { + + /** + * Properties of an AnalysisEvent. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IAnalysisEvent + * @property {string|null} [plannerReasoning] AnalysisEvent plannerReasoning + * @property {string|null} [coderInstruction] AnalysisEvent coderInstruction + * @property {string|null} [code] AnalysisEvent code + * @property {string|null} [executionOutput] AnalysisEvent executionOutput + * @property {string|null} [executionError] AnalysisEvent executionError + * @property {string|null} [resultVegaChartJson] AnalysisEvent resultVegaChartJson + * @property {string|null} [resultNaturalLanguage] AnalysisEvent resultNaturalLanguage + * @property {string|null} [resultCsvData] AnalysisEvent resultCsvData + * @property {string|null} [resultReferenceData] AnalysisEvent resultReferenceData + * @property {string|null} [error] AnalysisEvent error + */ + + /** + * Constructs a new AnalysisEvent. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an AnalysisEvent. + * @implements IAnalysisEvent + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent=} [properties] Properties to set + */ + function AnalysisEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisEvent plannerReasoning. + * @member {string|null|undefined} plannerReasoning + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.plannerReasoning = null; + + /** + * AnalysisEvent coderInstruction. + * @member {string|null|undefined} coderInstruction + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.coderInstruction = null; + + /** + * AnalysisEvent code. + * @member {string|null|undefined} code + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.code = null; + + /** + * AnalysisEvent executionOutput. + * @member {string|null|undefined} executionOutput + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.executionOutput = null; + + /** + * AnalysisEvent executionError. + * @member {string|null|undefined} executionError + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.executionError = null; + + /** + * AnalysisEvent resultVegaChartJson. + * @member {string|null|undefined} resultVegaChartJson + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultVegaChartJson = null; + + /** + * AnalysisEvent resultNaturalLanguage. + * @member {string|null|undefined} resultNaturalLanguage + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultNaturalLanguage = null; + + /** + * AnalysisEvent resultCsvData. + * @member {string|null|undefined} resultCsvData + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultCsvData = null; + + /** + * AnalysisEvent resultReferenceData. + * @member {string|null|undefined} resultReferenceData + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultReferenceData = null; + + /** + * AnalysisEvent error. + * @member {string|null|undefined} error + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalysisEvent kind. + * @member {"plannerReasoning"|"coderInstruction"|"code"|"executionOutput"|"executionError"|"resultVegaChartJson"|"resultNaturalLanguage"|"resultCsvData"|"resultReferenceData"|"error"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + */ + Object.defineProperty(AnalysisEvent.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["plannerReasoning", "coderInstruction", "code", "executionOutput", "executionError", "resultVegaChartJson", "resultNaturalLanguage", "resultCsvData", "resultReferenceData", "error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalysisEvent instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisEvent} AnalysisEvent instance + */ + AnalysisEvent.create = function create(properties) { + return new AnalysisEvent(properties); + }; + + /** + * Encodes the specified AnalysisEvent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent} message AnalysisEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.plannerReasoning != null && Object.hasOwnProperty.call(message, "plannerReasoning")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.plannerReasoning); + if (message.coderInstruction != null && Object.hasOwnProperty.call(message, "coderInstruction")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.coderInstruction); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + if (message.executionOutput != null && Object.hasOwnProperty.call(message, "executionOutput")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.executionOutput); + if (message.executionError != null && Object.hasOwnProperty.call(message, "executionError")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.executionError); + if (message.resultVegaChartJson != null && Object.hasOwnProperty.call(message, "resultVegaChartJson")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.resultVegaChartJson); + if (message.resultNaturalLanguage != null && Object.hasOwnProperty.call(message, "resultNaturalLanguage")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resultNaturalLanguage); + if (message.resultCsvData != null && Object.hasOwnProperty.call(message, "resultCsvData")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.resultCsvData); + if (message.resultReferenceData != null && Object.hasOwnProperty.call(message, "resultReferenceData")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.resultReferenceData); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.error); + return writer; + }; + + /** + * Encodes the specified AnalysisEvent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.AnalysisEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IAnalysisEvent} message AnalysisEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisEvent} AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisEvent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.plannerReasoning = reader.string(); + break; + } + case 3: { + message.coderInstruction = reader.string(); + break; + } + case 4: { + message.code = reader.string(); + break; + } + case 5: { + message.executionOutput = reader.string(); + break; + } + case 6: { + message.executionError = reader.string(); + break; + } + case 7: { + message.resultVegaChartJson = reader.string(); + break; + } + case 8: { + message.resultNaturalLanguage = reader.string(); + break; + } + case 9: { + message.resultCsvData = reader.string(); + break; + } + case 10: { + message.resultReferenceData = reader.string(); + break; + } + case 11: { + message.error = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisEvent} AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisEvent message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { + properties.kind = 1; + if (!$util.isString(message.plannerReasoning)) + return "plannerReasoning: string expected"; + } + if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.coderInstruction)) + return "coderInstruction: string expected"; + } + if (message.code != null && message.hasOwnProperty("code")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.code)) + return "code: string expected"; + } + if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.executionOutput)) + return "executionOutput: string expected"; + } + if (message.executionError != null && message.hasOwnProperty("executionError")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.executionError)) + return "executionError: string expected"; + } + if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultVegaChartJson)) + return "resultVegaChartJson: string expected"; + } + if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultNaturalLanguage)) + return "resultNaturalLanguage: string expected"; + } + if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultCsvData)) + return "resultCsvData: string expected"; + } + if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultReferenceData)) + return "resultReferenceData: string expected"; + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.error)) + return "error: string expected"; + } + return null; + }; + + /** + * Creates an AnalysisEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.AnalysisEvent} AnalysisEvent + */ + AnalysisEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.AnalysisEvent(); + if (object.plannerReasoning != null) + message.plannerReasoning = String(object.plannerReasoning); + if (object.coderInstruction != null) + message.coderInstruction = String(object.coderInstruction); + if (object.code != null) + message.code = String(object.code); + if (object.executionOutput != null) + message.executionOutput = String(object.executionOutput); + if (object.executionError != null) + message.executionError = String(object.executionError); + if (object.resultVegaChartJson != null) + message.resultVegaChartJson = String(object.resultVegaChartJson); + if (object.resultNaturalLanguage != null) + message.resultNaturalLanguage = String(object.resultNaturalLanguage); + if (object.resultCsvData != null) + message.resultCsvData = String(object.resultCsvData); + if (object.resultReferenceData != null) + message.resultReferenceData = String(object.resultReferenceData); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from an AnalysisEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.AnalysisEvent} message AnalysisEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { + object.plannerReasoning = message.plannerReasoning; + if (options.oneofs) + object.kind = "plannerReasoning"; + } + if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { + object.coderInstruction = message.coderInstruction; + if (options.oneofs) + object.kind = "coderInstruction"; + } + if (message.code != null && message.hasOwnProperty("code")) { + object.code = message.code; + if (options.oneofs) + object.kind = "code"; + } + if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { + object.executionOutput = message.executionOutput; + if (options.oneofs) + object.kind = "executionOutput"; + } + if (message.executionError != null && message.hasOwnProperty("executionError")) { + object.executionError = message.executionError; + if (options.oneofs) + object.kind = "executionError"; + } + if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { + object.resultVegaChartJson = message.resultVegaChartJson; + if (options.oneofs) + object.kind = "resultVegaChartJson"; + } + if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { + object.resultNaturalLanguage = message.resultNaturalLanguage; + if (options.oneofs) + object.kind = "resultNaturalLanguage"; + } + if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { + object.resultCsvData = message.resultCsvData; + if (options.oneofs) + object.kind = "resultCsvData"; + } + if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { + object.resultReferenceData = message.resultReferenceData; + if (options.oneofs) + object.kind = "resultReferenceData"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = message.error; + if (options.oneofs) + object.kind = "error"; + } + return object; + }; + + /** + * Converts this AnalysisEvent to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @instance + * @returns {Object.} JSON object + */ + AnalysisEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisEvent + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.AnalysisEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.AnalysisEvent"; + }; + + return AnalysisEvent; + })(); + + v1alpha.ChartMessage = (function() { + + /** + * Properties of a ChartMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IChartMessage + * @property {google.cloud.geminidataanalytics.v1alpha.IChartQuery|null} [query] ChartMessage query + * @property {google.cloud.geminidataanalytics.v1alpha.IChartResult|null} [result] ChartMessage result + */ + + /** + * Constructs a new ChartMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ChartMessage. + * @implements IChartMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IChartMessage=} [properties] Properties to set + */ + function ChartMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartMessage query. + * @member {google.cloud.geminidataanalytics.v1alpha.IChartQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @instance + */ + ChartMessage.prototype.query = null; + + /** + * ChartMessage result. + * @member {google.cloud.geminidataanalytics.v1alpha.IChartResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @instance + */ + ChartMessage.prototype.result = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChartMessage kind. + * @member {"query"|"result"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @instance + */ + Object.defineProperty(ChartMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "result"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChartMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartMessage} ChartMessage instance + */ + ChartMessage.create = function create(properties) { + return new ChartMessage(properties); + }; + + /** + * Encodes the specified ChartMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartMessage} message ChartMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1alpha.ChartResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChartMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartMessage} message ChartMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartMessage} ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = $root.google.cloud.geminidataanalytics.v1alpha.ChartResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartMessage} ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ChartResult.verify(message.result); + if (error) + return "result." + error; + } + } + return null; + }; + + /** + * Creates a ChartMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartMessage} ChartMessage + */ + ChartMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChartMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery.fromObject(object.query); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChartMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1alpha.ChartResult.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a ChartMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartMessage} message ChartMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1alpha.ChartResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; + } + return object; + }; + + /** + * Converts this ChartMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @instance + * @returns {Object.} JSON object + */ + ChartMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChartMessage"; + }; + + return ChartMessage; + })(); + + v1alpha.ChartQuery = (function() { + + /** + * Properties of a ChartQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IChartQuery + * @property {string|null} [instructions] ChartQuery instructions + * @property {string|null} [dataResultName] ChartQuery dataResultName + */ + + /** + * Constructs a new ChartQuery. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ChartQuery. + * @implements IChartQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IChartQuery=} [properties] Properties to set + */ + function ChartQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartQuery instructions. + * @member {string} instructions + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @instance + */ + ChartQuery.prototype.instructions = ""; + + /** + * ChartQuery dataResultName. + * @member {string} dataResultName + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @instance + */ + ChartQuery.prototype.dataResultName = ""; + + /** + * Creates a new ChartQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartQuery} ChartQuery instance + */ + ChartQuery.create = function create(properties) { + return new ChartQuery(properties); + }; + + /** + * Encodes the specified ChartQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartQuery} message ChartQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instructions); + if (message.dataResultName != null && Object.hasOwnProperty.call(message, "dataResultName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultName); + return writer; + }; + + /** + * Encodes the specified ChartQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartQuery} message ChartQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartQuery} ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.instructions = reader.string(); + break; + } + case 2: { + message.dataResultName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartQuery} ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) + if (!$util.isString(message.dataResultName)) + return "dataResultName: string expected"; + return null; + }; + + /** + * Creates a ChartQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartQuery} ChartQuery + */ + ChartQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartQuery(); + if (object.instructions != null) + message.instructions = String(object.instructions); + if (object.dataResultName != null) + message.dataResultName = String(object.dataResultName); + return message; + }; + + /** + * Creates a plain object from a ChartQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartQuery} message ChartQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.instructions = ""; + object.dataResultName = ""; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) + object.dataResultName = message.dataResultName; + return object; + }; + + /** + * Converts this ChartQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @instance + * @returns {Object.} JSON object + */ + ChartQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChartQuery"; + }; + + return ChartQuery; + })(); + + v1alpha.ChartResult = (function() { + + /** + * Properties of a ChartResult. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IChartResult + * @property {google.protobuf.IStruct|null} [vegaConfig] ChartResult vegaConfig + * @property {google.cloud.geminidataanalytics.v1alpha.IBlob|null} [image] ChartResult image + */ + + /** + * Constructs a new ChartResult. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a ChartResult. + * @implements IChartResult + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IChartResult=} [properties] Properties to set + */ + function ChartResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartResult vegaConfig. + * @member {google.protobuf.IStruct|null|undefined} vegaConfig + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @instance + */ + ChartResult.prototype.vegaConfig = null; + + /** + * ChartResult image. + * @member {google.cloud.geminidataanalytics.v1alpha.IBlob|null|undefined} image + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @instance + */ + ChartResult.prototype.image = null; + + /** + * Creates a new ChartResult instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartResult} ChartResult instance + */ + ChartResult.create = function create(properties) { + return new ChartResult(properties); + }; + + /** + * Encodes the specified ChartResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartResult} message ChartResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vegaConfig != null && Object.hasOwnProperty.call(message, "vegaConfig")) + $root.google.protobuf.Struct.encode(message.vegaConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.geminidataanalytics.v1alpha.Blob.encode(message.image, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChartResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ChartResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IChartResult} message ChartResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartResult} ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.vegaConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.image = $root.google.cloud.geminidataanalytics.v1alpha.Blob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartResult} ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartResult message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) { + var error = $root.google.protobuf.Struct.verify(message.vegaConfig); + if (error) + return "vegaConfig." + error; + } + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.Blob.verify(message.image); + if (error) + return "image." + error; + } + return null; + }; + + /** + * Creates a ChartResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ChartResult} ChartResult + */ + ChartResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ChartResult) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ChartResult(); + if (object.vegaConfig != null) { + if (typeof object.vegaConfig !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChartResult.vegaConfig: object expected"); + message.vegaConfig = $root.google.protobuf.Struct.fromObject(object.vegaConfig); + } + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ChartResult.image: object expected"); + message.image = $root.google.cloud.geminidataanalytics.v1alpha.Blob.fromObject(object.image); + } + return message; + }; + + /** + * Creates a plain object from a ChartResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ChartResult} message ChartResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vegaConfig = null; + object.image = null; + } + if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) + object.vegaConfig = $root.google.protobuf.Struct.toObject(message.vegaConfig, options); + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.geminidataanalytics.v1alpha.Blob.toObject(message.image, options); + return object; + }; + + /** + * Converts this ChartResult to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @instance + * @returns {Object.} JSON object + */ + ChartResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartResult + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ChartResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ChartResult"; + }; + + return ChartResult; + })(); + + v1alpha.ErrorMessage = (function() { + + /** + * Properties of an ErrorMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IErrorMessage + * @property {string|null} [text] ErrorMessage text + */ + + /** + * Constructs a new ErrorMessage. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an ErrorMessage. + * @implements IErrorMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IErrorMessage=} [properties] Properties to set + */ + function ErrorMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorMessage text. + * @member {string} text + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @instance + */ + ErrorMessage.prototype.text = ""; + + /** + * Creates a new ErrorMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IErrorMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ErrorMessage} ErrorMessage instance + */ + ErrorMessage.create = function create(properties) { + return new ErrorMessage(properties); + }; + + /** + * Encodes the specified ErrorMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ErrorMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IErrorMessage} message ErrorMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ErrorMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IErrorMessage} message ErrorMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ErrorMessage} ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ErrorMessage} ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates an ErrorMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ErrorMessage} ErrorMessage + */ + ErrorMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ErrorMessage(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from an ErrorMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ErrorMessage} message ErrorMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this ErrorMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @instance + * @returns {Object.} JSON object + */ + ErrorMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ErrorMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ErrorMessage"; + }; + + return ErrorMessage; + })(); + + v1alpha.ExampleQueries = (function() { + + /** + * Properties of an ExampleQueries. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IExampleQueries + * @property {Array.|null} [exampleQueries] ExampleQueries exampleQueries + */ + + /** + * Constructs a new ExampleQueries. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an ExampleQueries. + * @implements IExampleQueries + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries=} [properties] Properties to set + */ + function ExampleQueries(properties) { + this.exampleQueries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExampleQueries exampleQueries. + * @member {Array.} exampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @instance + */ + ExampleQueries.prototype.exampleQueries = $util.emptyArray; + + /** + * Creates a new ExampleQueries instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries instance + */ + ExampleQueries.create = function create(properties) { + return new ExampleQueries(properties); + }; + + /** + * Encodes the specified ExampleQueries message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries} message ExampleQueries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleQueries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exampleQueries != null && message.exampleQueries.length) + for (var i = 0; i < message.exampleQueries.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.encode(message.exampleQueries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExampleQueries message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries} message ExampleQueries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleQueries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExampleQueries message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleQueries.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.exampleQueries && message.exampleQueries.length)) + message.exampleQueries = []; + message.exampleQueries.push($root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExampleQueries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleQueries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExampleQueries message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExampleQueries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (!Array.isArray(message.exampleQueries)) + return "exampleQueries: array expected"; + for (var i = 0; i < message.exampleQueries.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify(message.exampleQueries[i]); + if (error) + return "exampleQueries." + error; + } + } + return null; + }; + + /** + * Creates an ExampleQueries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries + */ + ExampleQueries.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries(); + if (object.exampleQueries) { + if (!Array.isArray(object.exampleQueries)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ExampleQueries.exampleQueries: array expected"); + message.exampleQueries = []; + for (var i = 0; i < object.exampleQueries.length; ++i) { + if (typeof object.exampleQueries[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ExampleQueries.exampleQueries: object expected"); + message.exampleQueries[i] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.fromObject(object.exampleQueries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExampleQueries message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} message ExampleQueries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExampleQueries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exampleQueries = []; + if (message.exampleQueries && message.exampleQueries.length) { + object.exampleQueries = []; + for (var j = 0; j < message.exampleQueries.length; ++j) + object.exampleQueries[j] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.toObject(message.exampleQueries[j], options); + } + return object; + }; + + /** + * Converts this ExampleQueries to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @instance + * @returns {Object.} JSON object + */ + ExampleQueries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExampleQueries + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExampleQueries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ExampleQueries"; + }; + + return ExampleQueries; + })(); + + v1alpha.Blob = (function() { + + /** + * Properties of a Blob. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IBlob + * @property {string|null} [mimeType] Blob mimeType + * @property {Uint8Array|null} [data] Blob data + */ + + /** + * Constructs a new Blob. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Blob. + * @implements IBlob + * @constructor + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob=} [properties] Properties to set + */ + function Blob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Blob mimeType. + * @member {string} mimeType + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @instance + */ + Blob.prototype.mimeType = ""; + + /** + * Blob data. + * @member {Uint8Array} data + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @instance + */ + Blob.prototype.data = $util.newBuffer([]); + + /** + * Creates a new Blob instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob instance + */ + Blob.create = function create(properties) { + return new Blob(properties); + }; + + /** + * Encodes the specified Blob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob} message Blob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Blob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified Blob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob} message Blob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Blob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Blob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Blob.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Blob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Blob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Blob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Blob message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Blob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a Blob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob + */ + Blob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Blob) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Blob(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a Blob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1alpha.Blob} message Blob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Blob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this Blob to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @instance + * @returns {Object.} JSON object + */ + Blob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Blob + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Blob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Blob"; + }; + + return Blob; + })(); + + return v1alpha; + })(); + + geminidataanalytics.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.cloud.geminidataanalytics + * @namespace + */ + var v1beta = {}; + + v1beta.Context = (function() { + + /** + * Properties of a Context. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IContext + * @property {string|null} [systemInstruction] Context systemInstruction + * @property {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null} [datasourceReferences] Context datasourceReferences + * @property {google.cloud.geminidataanalytics.v1beta.IConversationOptions|null} [options] Context options + * @property {Array.|null} [exampleQueries] Context exampleQueries + */ + + /** + * Constructs a new Context. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Context. + * @implements IContext + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IContext=} [properties] Properties to set + */ + function Context(properties) { + this.exampleQueries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Context systemInstruction. + * @member {string} systemInstruction + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.systemInstruction = ""; + + /** + * Context datasourceReferences. + * @member {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null|undefined} datasourceReferences + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.datasourceReferences = null; + + /** + * Context options. + * @member {google.cloud.geminidataanalytics.v1beta.IConversationOptions|null|undefined} options + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.options = null; + + /** + * Context exampleQueries. + * @member {Array.} exampleQueries + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.exampleQueries = $util.emptyArray; + + /** + * Creates a new Context instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context instance + */ + Context.create = function create(properties) { + return new Context(properties); + }; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemInstruction != null && Object.hasOwnProperty.call(message, "systemInstruction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.systemInstruction); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exampleQueries != null && message.exampleQueries.length) + for (var i = 0; i < message.exampleQueries.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.encode(message.exampleQueries[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.datasourceReferences != null && Object.hasOwnProperty.call(message, "datasourceReferences")) + $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.encode(message.datasourceReferences, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Context message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Context(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.systemInstruction = reader.string(); + break; + } + case 7: { + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.decode(reader, reader.uint32()); + break; + } + case 3: { + message.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.exampleQueries && message.exampleQueries.length)) + message.exampleQueries = []; + message.exampleQueries.push($root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Context message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Context.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) + if (!$util.isString(message.systemInstruction)) + return "systemInstruction: string expected"; + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify(message.datasourceReferences); + if (error) + return "datasourceReferences." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (!Array.isArray(message.exampleQueries)) + return "exampleQueries: array expected"; + for (var i = 0; i < message.exampleQueries.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.verify(message.exampleQueries[i]); + if (error) + return "exampleQueries." + error; + } + } + return null; + }; + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + */ + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Context) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Context(); + if (object.systemInstruction != null) + message.systemInstruction = String(object.systemInstruction); + if (object.datasourceReferences != null) { + if (typeof object.datasourceReferences !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.datasourceReferences: object expected"); + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.fromObject(object.datasourceReferences); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.options: object expected"); + message.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.fromObject(object.options); + } + if (object.exampleQueries) { + if (!Array.isArray(object.exampleQueries)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.exampleQueries: array expected"); + message.exampleQueries = []; + for (var i = 0; i < object.exampleQueries.length; ++i) { + if (typeof object.exampleQueries[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.exampleQueries: object expected"); + message.exampleQueries[i] = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.fromObject(object.exampleQueries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Context} message Context + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Context.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exampleQueries = []; + if (options.defaults) { + object.systemInstruction = ""; + object.options = null; + object.datasourceReferences = null; + } + if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) + object.systemInstruction = message.systemInstruction; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.toObject(message.options, options); + if (message.exampleQueries && message.exampleQueries.length) { + object.exampleQueries = []; + for (var j = 0; j < message.exampleQueries.length; ++j) + object.exampleQueries[j] = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.toObject(message.exampleQueries[j], options); + } + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) + object.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.toObject(message.datasourceReferences, options); + return object; + }; + + /** + * Converts this Context to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + * @returns {Object.} JSON object + */ + Context.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Context + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Context.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Context"; + }; + + return Context; + })(); + + v1beta.ExampleQuery = (function() { + + /** + * Properties of an ExampleQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IExampleQuery + * @property {string|null} [sqlQuery] ExampleQuery sqlQuery + * @property {string|null} [naturalLanguageQuestion] ExampleQuery naturalLanguageQuestion + */ + + /** + * Constructs a new ExampleQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an ExampleQuery. + * @implements IExampleQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IExampleQuery=} [properties] Properties to set + */ + function ExampleQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExampleQuery sqlQuery. + * @member {string|null|undefined} sqlQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @instance + */ + ExampleQuery.prototype.sqlQuery = null; + + /** + * ExampleQuery naturalLanguageQuestion. + * @member {string} naturalLanguageQuestion + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @instance + */ + ExampleQuery.prototype.naturalLanguageQuestion = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExampleQuery query. + * @member {"sqlQuery"|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @instance + */ + Object.defineProperty(ExampleQuery.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["sqlQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExampleQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IExampleQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ExampleQuery} ExampleQuery instance + */ + ExampleQuery.create = function create(properties) { + return new ExampleQuery(properties); + }; + + /** + * Encodes the specified ExampleQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExampleQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IExampleQuery} message ExampleQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.naturalLanguageQuestion != null && Object.hasOwnProperty.call(message, "naturalLanguageQuestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.naturalLanguageQuestion); + if (message.sqlQuery != null && Object.hasOwnProperty.call(message, "sqlQuery")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.sqlQuery); + return writer; + }; + + /** + * Encodes the specified ExampleQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExampleQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IExampleQuery} message ExampleQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ExampleQuery} ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 101: { + message.sqlQuery = reader.string(); + break; + } + case 1: { + message.naturalLanguageQuestion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExampleQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ExampleQuery} ExampleQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExampleQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExampleQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { + properties.query = 1; + if (!$util.isString(message.sqlQuery)) + return "sqlQuery: string expected"; + } + if (message.naturalLanguageQuestion != null && message.hasOwnProperty("naturalLanguageQuestion")) + if (!$util.isString(message.naturalLanguageQuestion)) + return "naturalLanguageQuestion: string expected"; + return null; + }; + + /** + * Creates an ExampleQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ExampleQuery} ExampleQuery + */ + ExampleQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery(); + if (object.sqlQuery != null) + message.sqlQuery = String(object.sqlQuery); + if (object.naturalLanguageQuestion != null) + message.naturalLanguageQuestion = String(object.naturalLanguageQuestion); + return message; + }; + + /** + * Creates a plain object from an ExampleQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExampleQuery} message ExampleQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExampleQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.naturalLanguageQuestion = ""; + if (message.naturalLanguageQuestion != null && message.hasOwnProperty("naturalLanguageQuestion")) + object.naturalLanguageQuestion = message.naturalLanguageQuestion; + if (message.sqlQuery != null && message.hasOwnProperty("sqlQuery")) { + object.sqlQuery = message.sqlQuery; + if (options.oneofs) + object.query = "sqlQuery"; + } + return object; + }; + + /** + * Converts this ExampleQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @instance + * @returns {Object.} JSON object + */ + ExampleQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExampleQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ExampleQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExampleQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExampleQuery"; + }; + + return ExampleQuery; + })(); + + v1beta.ConversationOptions = (function() { + + /** + * Properties of a ConversationOptions. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IConversationOptions + * @property {google.cloud.geminidataanalytics.v1beta.IChartOptions|null} [chart] ConversationOptions chart + * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisOptions|null} [analysis] ConversationOptions analysis + */ + + /** + * Constructs a new ConversationOptions. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ConversationOptions. + * @implements IConversationOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IConversationOptions=} [properties] Properties to set + */ + function ConversationOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationOptions chart. + * @member {google.cloud.geminidataanalytics.v1beta.IChartOptions|null|undefined} chart + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @instance + */ + ConversationOptions.prototype.chart = null; + + /** + * ConversationOptions analysis. + * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisOptions|null|undefined} analysis + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @instance + */ + ConversationOptions.prototype.analysis = null; + + /** + * Creates a new ConversationOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversationOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationOptions} ConversationOptions instance + */ + ConversationOptions.create = function create(properties) { + return new ConversationOptions(properties); + }; + + /** + * Encodes the specified ConversationOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversationOptions} message ConversationOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chart != null && Object.hasOwnProperty.call(message, "chart")) + $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.encode(message.chart, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.encode(message.analysis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversationOptions} message ConversationOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationOptions} ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.decode(reader, reader.uint32()); + break; + } + case 2: { + message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationOptions} ConversationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chart != null && message.hasOwnProperty("chart")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.verify(message.chart); + if (error) + return "chart." + error; + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.verify(message.analysis); + if (error) + return "analysis." + error; + } + return null; + }; + + /** + * Creates a ConversationOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationOptions} ConversationOptions + */ + ConversationOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions(); + if (object.chart != null) { + if (typeof object.chart !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ConversationOptions.chart: object expected"); + message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.fromObject(object.chart); + } + if (object.analysis != null) { + if (typeof object.analysis !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ConversationOptions.analysis: object expected"); + message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.fromObject(object.analysis); + } + return message; + }; + + /** + * Creates a plain object from a ConversationOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ConversationOptions} message ConversationOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chart = null; + object.analysis = null; + } + if (message.chart != null && message.hasOwnProperty("chart")) + object.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.toObject(message.chart, options); + if (message.analysis != null && message.hasOwnProperty("analysis")) + object.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.toObject(message.analysis, options); + return object; + }; + + /** + * Converts this ConversationOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @instance + * @returns {Object.} JSON object + */ + ConversationOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ConversationOptions"; + }; + + return ConversationOptions; + })(); + + v1beta.ChartOptions = (function() { + + /** + * Properties of a ChartOptions. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IChartOptions + * @property {google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions|null} [image] ChartOptions image + */ + + /** + * Constructs a new ChartOptions. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ChartOptions. + * @implements IChartOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IChartOptions=} [properties] Properties to set + */ + function ChartOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartOptions image. + * @member {google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions|null|undefined} image + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @instance + */ + ChartOptions.prototype.image = null; + + /** + * Creates a new ChartOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions} ChartOptions instance + */ + ChartOptions.create = function create(properties) { + return new ChartOptions(properties); + }; + + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.image = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.verify(message.image); + if (error) + return "image." + error; + } + return null; + }; + + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions} ChartOptions + */ + ChartOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions(); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartOptions.image: object expected"); + message.image = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.fromObject(object.image); + } + return message; + }; + + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions} message ChartOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.image = null; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.toObject(message.image, options); + return object; + }; + + /** + * Converts this ChartOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @instance + * @returns {Object.} JSON object + */ + ChartOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartOptions"; + }; + + ChartOptions.ImageOptions = (function() { + + /** + * Properties of an ImageOptions. + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @interface IImageOptions + * @property {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage|null} [noImage] ImageOptions noImage + * @property {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions|null} [svg] ImageOptions svg + */ + + /** + * Constructs a new ImageOptions. + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions + * @classdesc Represents an ImageOptions. + * @implements IImageOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions=} [properties] Properties to set + */ + function ImageOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageOptions noImage. + * @member {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage|null|undefined} noImage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @instance + */ + ImageOptions.prototype.noImage = null; + + /** + * ImageOptions svg. + * @member {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions|null|undefined} svg + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @instance + */ + ImageOptions.prototype.svg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImageOptions kind. + * @member {"noImage"|"svg"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @instance + */ + Object.defineProperty(ImageOptions.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["noImage", "svg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions} ImageOptions instance + */ + ImageOptions.create = function create(properties) { + return new ImageOptions(properties); + }; + + /** + * Encodes the specified ImageOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions} message ImageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.noImage != null && Object.hasOwnProperty.call(message, "noImage")) + $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.encode(message.noImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.svg != null && Object.hasOwnProperty.call(message, "svg")) + $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.encode(message.svg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.IImageOptions} message ImageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions} ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.noImage = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.svg = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions} ImageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.noImage != null && message.hasOwnProperty("noImage")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.verify(message.noImage); + if (error) + return "noImage." + error; + } + } + if (message.svg != null && message.hasOwnProperty("svg")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.verify(message.svg); + if (error) + return "svg." + error; + } + } + return null; + }; + + /** + * Creates an ImageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions} ImageOptions + */ + ImageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions(); + if (object.noImage != null) { + if (typeof object.noImage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.noImage: object expected"); + message.noImage = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.fromObject(object.noImage); + } + if (object.svg != null) { + if (typeof object.svg !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.svg: object expected"); + message.svg = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.fromObject(object.svg); + } + return message; + }; + + /** + * Creates a plain object from an ImageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions} message ImageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.noImage != null && message.hasOwnProperty("noImage")) { + object.noImage = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.toObject(message.noImage, options); + if (options.oneofs) + object.kind = "noImage"; + } + if (message.svg != null && message.hasOwnProperty("svg")) { + object.svg = $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.toObject(message.svg, options); + if (options.oneofs) + object.kind = "svg"; + } + return object; + }; + + /** + * Converts this ImageOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @instance + * @returns {Object.} JSON object + */ + ImageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions"; + }; + + ImageOptions.NoImage = (function() { + + /** + * Properties of a NoImage. + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @interface INoImage + */ + + /** + * Constructs a new NoImage. + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @classdesc Represents a NoImage. + * @implements INoImage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage=} [properties] Properties to set + */ + function NoImage(properties) { + if (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 NoImage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage} NoImage instance + */ + NoImage.create = function create(properties) { + return new NoImage(properties); + }; + + /** + * Encodes the specified NoImage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage} message NoImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoImage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified NoImage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.INoImage} message NoImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoImage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NoImage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage} NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoImage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NoImage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage} NoImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoImage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NoImage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NoImage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a NoImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage} NoImage + */ + NoImage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage) + return object; + return new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage(); + }; + + /** + * Creates a plain object from a NoImage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage} message NoImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NoImage.toObject = function toObject() { + return {}; + }; + + /** + * Converts this NoImage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @instance + * @returns {Object.} JSON object + */ + NoImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NoImage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NoImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage"; + }; + + return NoImage; + })(); + + ImageOptions.SvgOptions = (function() { + + /** + * Properties of a SvgOptions. + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @interface ISvgOptions + */ + + /** + * Constructs a new SvgOptions. + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions + * @classdesc Represents a SvgOptions. + * @implements ISvgOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions=} [properties] Properties to set + */ + function SvgOptions(properties) { + if (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 SvgOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions} SvgOptions instance + */ + SvgOptions.create = function create(properties) { + return new SvgOptions(properties); + }; + + /** + * Encodes the specified SvgOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions} message SvgOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SvgOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SvgOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.ISvgOptions} message SvgOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SvgOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SvgOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions} SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SvgOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SvgOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions} SvgOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SvgOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SvgOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SvgOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SvgOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions} SvgOptions + */ + SvgOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions) + return object; + return new $root.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions(); + }; + + /** + * Creates a plain object from a SvgOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions} message SvgOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SvgOptions.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SvgOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @instance + * @returns {Object.} JSON object + */ + SvgOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SvgOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SvgOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions"; + }; + + return SvgOptions; + })(); + + return ImageOptions; + })(); + + return ChartOptions; + })(); + + v1beta.AnalysisOptions = (function() { + + /** + * Properties of an AnalysisOptions. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IAnalysisOptions + * @property {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython|null} [python] AnalysisOptions python + */ + + /** + * Constructs a new AnalysisOptions. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an AnalysisOptions. + * @implements IAnalysisOptions + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisOptions=} [properties] Properties to set + */ + function AnalysisOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisOptions python. + * @member {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython|null|undefined} python + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @instance + */ + AnalysisOptions.prototype.python = null; + + /** + * Creates a new AnalysisOptions instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisOptions=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions} AnalysisOptions instance + */ + AnalysisOptions.create = function create(properties) { + return new AnalysisOptions(properties); + }; + + /** + * Encodes the specified AnalysisOptions message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisOptions} message AnalysisOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.python != null && Object.hasOwnProperty.call(message, "python")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.encode(message.python, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalysisOptions message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisOptions} message AnalysisOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions} AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.python = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions} AnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisOptions message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.python != null && message.hasOwnProperty("python")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.verify(message.python); + if (error) + return "python." + error; + } + return null; + }; + + /** + * Creates an AnalysisOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions} AnalysisOptions + */ + AnalysisOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions(); + if (object.python != null) { + if (typeof object.python !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisOptions.python: object expected"); + message.python = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.fromObject(object.python); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisOptions} message AnalysisOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.python = null; + if (message.python != null && message.hasOwnProperty("python")) + object.python = $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.toObject(message.python, options); + return object; + }; + + /** + * Converts this AnalysisOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @instance + * @returns {Object.} JSON object + */ + AnalysisOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisOptions"; + }; + + AnalysisOptions.Python = (function() { + + /** + * Properties of a Python. + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @interface IPython + * @property {boolean|null} [enabled] Python enabled + */ + + /** + * Constructs a new Python. + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions + * @classdesc Represents a Python. + * @implements IPython + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython=} [properties] Properties to set + */ + function Python(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Python enabled. + * @member {boolean} enabled + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @instance + */ + Python.prototype.enabled = false; + + /** + * Creates a new Python instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python} Python instance + */ + Python.create = function create(properties) { + return new Python(properties); + }; + + /** + * Encodes the specified Python message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython} message Python message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Python.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); + return writer; + }; + + /** + * Encodes the specified Python message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.IPython} message Python message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Python.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Python message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python} Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Python.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Python message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python} Python + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Python.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Python message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Python.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a Python message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python} Python + */ + Python.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a Python message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python} message Python + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Python.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this Python to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @instance + * @returns {Object.} JSON object + */ + Python.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Python + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Python.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python"; + }; + + return Python; + })(); + + return AnalysisOptions; + })(); + + /** + * DataFilterType enum. + * @name google.cloud.geminidataanalytics.v1beta.DataFilterType + * @enum {number} + * @property {number} DATA_FILTER_TYPE_UNSPECIFIED=0 DATA_FILTER_TYPE_UNSPECIFIED value + * @property {number} ALWAYS_FILTER=1 ALWAYS_FILTER value + */ + v1beta.DataFilterType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FILTER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALWAYS_FILTER"] = 1; + return values; + })(); + + v1beta.DatasourceReferences = (function() { + + /** + * Properties of a DatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDatasourceReferences + * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences|null} [bq] DatasourceReferences bq + * @property {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences|null} [studio] DatasourceReferences studio + * @property {google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences|null} [looker] DatasourceReferences looker + */ + + /** + * Constructs a new DatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DatasourceReferences. + * @implements IDatasourceReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences=} [properties] Properties to set + */ + function DatasourceReferences(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatasourceReferences bq. + * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences|null|undefined} bq + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @instance + */ + DatasourceReferences.prototype.bq = null; + + /** + * DatasourceReferences studio. + * @member {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences|null|undefined} studio + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @instance + */ + DatasourceReferences.prototype.studio = null; + + /** + * DatasourceReferences looker. + * @member {google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences|null|undefined} looker + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @instance + */ + DatasourceReferences.prototype.looker = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatasourceReferences references. + * @member {"bq"|"studio"|"looker"|undefined} references + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @instance + */ + Object.defineProperty(DatasourceReferences.prototype, "references", { + get: $util.oneOfGetter($oneOfFields = ["bq", "studio", "looker"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatasourceReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DatasourceReferences} DatasourceReferences instance + */ + DatasourceReferences.create = function create(properties) { + return new DatasourceReferences(properties); + }; + + /** + * Encodes the specified DatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences} message DatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasourceReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bq != null && Object.hasOwnProperty.call(message, "bq")) + $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.encode(message.bq, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.studio != null && Object.hasOwnProperty.call(message, "studio")) + $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.encode(message.studio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.looker != null && Object.hasOwnProperty.call(message, "looker")) + $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.encode(message.looker, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences} message DatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasourceReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DatasourceReferences} DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasourceReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bq = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.decode(reader, reader.uint32()); + break; + } + case 2: { + message.studio = $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.decode(reader, reader.uint32()); + break; + } + case 3: { + message.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatasourceReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DatasourceReferences} DatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasourceReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatasourceReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatasourceReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bq != null && message.hasOwnProperty("bq")) { + properties.references = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.verify(message.bq); + if (error) + return "bq." + error; + } + } + if (message.studio != null && message.hasOwnProperty("studio")) { + if (properties.references === 1) + return "references: multiple values"; + properties.references = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.verify(message.studio); + if (error) + return "studio." + error; + } + } + if (message.looker != null && message.hasOwnProperty("looker")) { + if (properties.references === 1) + return "references: multiple values"; + properties.references = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.verify(message.looker); + if (error) + return "looker." + error; + } + } + return null; + }; + + /** + * Creates a DatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DatasourceReferences} DatasourceReferences + */ + DatasourceReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences(); + if (object.bq != null) { + if (typeof object.bq !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DatasourceReferences.bq: object expected"); + message.bq = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.fromObject(object.bq); + } + if (object.studio != null) { + if (typeof object.studio !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DatasourceReferences.studio: object expected"); + message.studio = $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.fromObject(object.studio); + } + if (object.looker != null) { + if (typeof object.looker !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DatasourceReferences.looker: object expected"); + message.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.fromObject(object.looker); + } + return message; + }; + + /** + * Creates a plain object from a DatasourceReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DatasourceReferences} message DatasourceReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatasourceReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bq != null && message.hasOwnProperty("bq")) { + object.bq = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.toObject(message.bq, options); + if (options.oneofs) + object.references = "bq"; + } + if (message.studio != null && message.hasOwnProperty("studio")) { + object.studio = $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.toObject(message.studio, options); + if (options.oneofs) + object.references = "studio"; + } + if (message.looker != null && message.hasOwnProperty("looker")) { + object.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.toObject(message.looker, options); + if (options.oneofs) + object.references = "looker"; + } + return object; + }; + + /** + * Converts this DatasourceReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @instance + * @returns {Object.} JSON object + */ + DatasourceReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatasourceReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DatasourceReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatasourceReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DatasourceReferences"; + }; + + return DatasourceReferences; + })(); + + v1beta.BigQueryTableReferences = (function() { + + /** + * Properties of a BigQueryTableReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IBigQueryTableReferences + * @property {Array.|null} [tableReferences] BigQueryTableReferences tableReferences + */ + + /** + * Constructs a new BigQueryTableReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a BigQueryTableReferences. + * @implements IBigQueryTableReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences=} [properties] Properties to set + */ + function BigQueryTableReferences(properties) { + this.tableReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableReferences tableReferences. + * @member {Array.} tableReferences + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @instance + */ + BigQueryTableReferences.prototype.tableReferences = $util.emptyArray; + + /** + * Creates a new BigQueryTableReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences} BigQueryTableReferences instance + */ + BigQueryTableReferences.create = function create(properties) { + return new BigQueryTableReferences(properties); + }; + + /** + * Encodes the specified BigQueryTableReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences} message BigQueryTableReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableReferences != null && message.tableReferences.length) + for (var i = 0; i < message.tableReferences.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.encode(message.tableReferences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryTableReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReferences} message BigQueryTableReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences} BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tableReferences && message.tableReferences.length)) + message.tableReferences = []; + message.tableReferences.push($root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences} BigQueryTableReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableReferences != null && message.hasOwnProperty("tableReferences")) { + if (!Array.isArray(message.tableReferences)) + return "tableReferences: array expected"; + for (var i = 0; i < message.tableReferences.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify(message.tableReferences[i]); + if (error) + return "tableReferences." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryTableReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences} BigQueryTableReferences + */ + BigQueryTableReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences(); + if (object.tableReferences) { + if (!Array.isArray(object.tableReferences)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.tableReferences: array expected"); + message.tableReferences = []; + for (var i = 0; i < object.tableReferences.length; ++i) { + if (typeof object.tableReferences[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences.tableReferences: object expected"); + message.tableReferences[i] = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.fromObject(object.tableReferences[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences} message BigQueryTableReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tableReferences = []; + if (message.tableReferences && message.tableReferences.length) { + object.tableReferences = []; + for (var j = 0; j < message.tableReferences.length; ++j) + object.tableReferences[j] = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.toObject(message.tableReferences[j], options); + } + return object; + }; + + /** + * Converts this BigQueryTableReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences"; + }; + + return BigQueryTableReferences; + })(); + + v1beta.BigQueryTableReference = (function() { + + /** + * Properties of a BigQueryTableReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IBigQueryTableReference + * @property {string|null} [projectId] BigQueryTableReference projectId + * @property {string|null} [datasetId] BigQueryTableReference datasetId + * @property {string|null} [tableId] BigQueryTableReference tableId + * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] BigQueryTableReference schema + */ + + /** + * Constructs a new BigQueryTableReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a BigQueryTableReference. + * @implements IBigQueryTableReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference=} [properties] Properties to set + */ + function BigQueryTableReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableReference projectId. + * @member {string} projectId + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.projectId = ""; + + /** + * BigQueryTableReference datasetId. + * @member {string} datasetId + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.datasetId = ""; + + /** + * BigQueryTableReference tableId. + * @member {string} tableId + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.tableId = ""; + + /** + * BigQueryTableReference schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @instance + */ + BigQueryTableReference.prototype.schema = null; + + /** + * Creates a new BigQueryTableReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReference} BigQueryTableReference instance + */ + BigQueryTableReference.create = function create(properties) { + return new BigQueryTableReference(properties); + }; + + /** + * Encodes the specified BigQueryTableReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference} message BigQueryTableReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryTableReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference} message BigQueryTableReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReference} BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 3: { + message.datasetId = reader.string(); + break; + } + case 4: { + message.tableId = reader.string(); + break; + } + case 6: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReference} BigQueryTableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a BigQueryTableReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryTableReference} BigQueryTableReference + */ + BigQueryTableReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.BigQueryTableReference} message BigQueryTableReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.datasetId = ""; + object.tableId = ""; + object.schema = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this BigQueryTableReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryTableReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.BigQueryTableReference"; + }; + + return BigQueryTableReference; + })(); + + v1beta.StudioDatasourceReferences = (function() { + + /** + * Properties of a StudioDatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IStudioDatasourceReferences + * @property {Array.|null} [studioReferences] StudioDatasourceReferences studioReferences + */ + + /** + * Constructs a new StudioDatasourceReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a StudioDatasourceReferences. + * @implements IStudioDatasourceReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences=} [properties] Properties to set + */ + function StudioDatasourceReferences(properties) { + this.studioReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StudioDatasourceReferences studioReferences. + * @member {Array.} studioReferences + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @instance + */ + StudioDatasourceReferences.prototype.studioReferences = $util.emptyArray; + + /** + * Creates a new StudioDatasourceReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences} StudioDatasourceReferences instance + */ + StudioDatasourceReferences.create = function create(properties) { + return new StudioDatasourceReferences(properties); + }; + + /** + * Encodes the specified StudioDatasourceReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences} message StudioDatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.studioReferences != null && message.studioReferences.length) + for (var i = 0; i < message.studioReferences.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.encode(message.studioReferences[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StudioDatasourceReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReferences} message StudioDatasourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences} StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.studioReferences && message.studioReferences.length)) + message.studioReferences = []; + message.studioReferences.push($root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StudioDatasourceReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences} StudioDatasourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StudioDatasourceReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StudioDatasourceReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.studioReferences != null && message.hasOwnProperty("studioReferences")) { + if (!Array.isArray(message.studioReferences)) + return "studioReferences: array expected"; + for (var i = 0; i < message.studioReferences.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.verify(message.studioReferences[i]); + if (error) + return "studioReferences." + error; + } + } + return null; + }; + + /** + * Creates a StudioDatasourceReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences} StudioDatasourceReferences + */ + StudioDatasourceReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences(); + if (object.studioReferences) { + if (!Array.isArray(object.studioReferences)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.studioReferences: array expected"); + message.studioReferences = []; + for (var i = 0; i < object.studioReferences.length; ++i) { + if (typeof object.studioReferences[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences.studioReferences: object expected"); + message.studioReferences[i] = $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.fromObject(object.studioReferences[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a StudioDatasourceReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences} message StudioDatasourceReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StudioDatasourceReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.studioReferences = []; + if (message.studioReferences && message.studioReferences.length) { + object.studioReferences = []; + for (var j = 0; j < message.studioReferences.length; ++j) + object.studioReferences[j] = $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.toObject(message.studioReferences[j], options); + } + return object; + }; + + /** + * Converts this StudioDatasourceReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @instance + * @returns {Object.} JSON object + */ + StudioDatasourceReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StudioDatasourceReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StudioDatasourceReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences"; + }; + + return StudioDatasourceReferences; + })(); + + v1beta.StudioDatasourceReference = (function() { + + /** + * Properties of a StudioDatasourceReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IStudioDatasourceReference + * @property {string|null} [datasourceId] StudioDatasourceReference datasourceId + */ + + /** + * Constructs a new StudioDatasourceReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a StudioDatasourceReference. + * @implements IStudioDatasourceReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference=} [properties] Properties to set + */ + function StudioDatasourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StudioDatasourceReference datasourceId. + * @member {string} datasourceId + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @instance + */ + StudioDatasourceReference.prototype.datasourceId = ""; + + /** + * Creates a new StudioDatasourceReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference} StudioDatasourceReference instance + */ + StudioDatasourceReference.create = function create(properties) { + return new StudioDatasourceReference(properties); + }; + + /** + * Encodes the specified StudioDatasourceReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference} message StudioDatasourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasourceId != null && Object.hasOwnProperty.call(message, "datasourceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasourceId); + return writer; + }; + + /** + * Encodes the specified StudioDatasourceReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStudioDatasourceReference} message StudioDatasourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StudioDatasourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference} StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.datasourceId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StudioDatasourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference} StudioDatasourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StudioDatasourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StudioDatasourceReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StudioDatasourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasourceId != null && message.hasOwnProperty("datasourceId")) + if (!$util.isString(message.datasourceId)) + return "datasourceId: string expected"; + return null; + }; + + /** + * Creates a StudioDatasourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference} StudioDatasourceReference + */ + StudioDatasourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference(); + if (object.datasourceId != null) + message.datasourceId = String(object.datasourceId); + return message; + }; + + /** + * Creates a plain object from a StudioDatasourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference} message StudioDatasourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StudioDatasourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.datasourceId = ""; + if (message.datasourceId != null && message.hasOwnProperty("datasourceId")) + object.datasourceId = message.datasourceId; + return object; + }; + + /** + * Converts this StudioDatasourceReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @instance + * @returns {Object.} JSON object + */ + StudioDatasourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StudioDatasourceReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StudioDatasourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference"; + }; + + return StudioDatasourceReference; + })(); + + v1beta.LookerExploreReferences = (function() { + + /** + * Properties of a LookerExploreReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ILookerExploreReferences + * @property {Array.|null} [exploreReferences] LookerExploreReferences exploreReferences + * @property {google.cloud.geminidataanalytics.v1beta.ICredentials|null} [credentials] LookerExploreReferences credentials + */ + + /** + * Constructs a new LookerExploreReferences. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a LookerExploreReferences. + * @implements ILookerExploreReferences + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences=} [properties] Properties to set + */ + function LookerExploreReferences(properties) { + this.exploreReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerExploreReferences exploreReferences. + * @member {Array.} exploreReferences + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @instance + */ + LookerExploreReferences.prototype.exploreReferences = $util.emptyArray; + + /** + * LookerExploreReferences credentials. + * @member {google.cloud.geminidataanalytics.v1beta.ICredentials|null|undefined} credentials + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @instance + */ + LookerExploreReferences.prototype.credentials = null; + + /** + * Creates a new LookerExploreReferences instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReferences} LookerExploreReferences instance + */ + LookerExploreReferences.create = function create(properties) { + return new LookerExploreReferences(properties); + }; + + /** + * Encodes the specified LookerExploreReferences message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences} message LookerExploreReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exploreReferences != null && message.exploreReferences.length) + for (var i = 0; i < message.exploreReferences.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.encode(message.exploreReferences[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.credentials != null && Object.hasOwnProperty.call(message, "credentials")) + $root.google.cloud.geminidataanalytics.v1beta.Credentials.encode(message.credentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LookerExploreReferences message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReferences} message LookerExploreReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReferences} LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReferences.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.exploreReferences && message.exploreReferences.length)) + message.exploreReferences = []; + message.exploreReferences.push($root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.decode(reader, reader.uint32())); + break; + } + case 2: { + message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerExploreReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReferences} LookerExploreReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerExploreReferences message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerExploreReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exploreReferences != null && message.hasOwnProperty("exploreReferences")) { + if (!Array.isArray(message.exploreReferences)) + return "exploreReferences: array expected"; + for (var i = 0; i < message.exploreReferences.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.verify(message.exploreReferences[i]); + if (error) + return "exploreReferences." + error; + } + } + if (message.credentials != null && message.hasOwnProperty("credentials")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Credentials.verify(message.credentials); + if (error) + return "credentials." + error; + } + return null; + }; + + /** + * Creates a LookerExploreReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReferences} LookerExploreReferences + */ + LookerExploreReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReferences(); + if (object.exploreReferences) { + if (!Array.isArray(object.exploreReferences)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.exploreReferences: array expected"); + message.exploreReferences = []; + for (var i = 0; i < object.exploreReferences.length; ++i) { + if (typeof object.exploreReferences[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.exploreReferences: object expected"); + message.exploreReferences[i] = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.fromObject(object.exploreReferences[i]); + } + } + if (object.credentials != null) { + if (typeof object.credentials !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerExploreReferences.credentials: object expected"); + message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.fromObject(object.credentials); + } + return message; + }; + + /** + * Creates a plain object from a LookerExploreReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {google.cloud.geminidataanalytics.v1beta.LookerExploreReferences} message LookerExploreReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerExploreReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exploreReferences = []; + if (options.defaults) + object.credentials = null; + if (message.exploreReferences && message.exploreReferences.length) { + object.exploreReferences = []; + for (var j = 0; j < message.exploreReferences.length; ++j) + object.exploreReferences[j] = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.toObject(message.exploreReferences[j], options); + } + if (message.credentials != null && message.hasOwnProperty("credentials")) + object.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.toObject(message.credentials, options); + return object; + }; + + /** + * Converts this LookerExploreReferences to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @instance + * @returns {Object.} JSON object + */ + LookerExploreReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerExploreReferences + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerExploreReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.LookerExploreReferences"; + }; + + return LookerExploreReferences; + })(); + + v1beta.LookerExploreReference = (function() { + + /** + * Properties of a LookerExploreReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ILookerExploreReference + * @property {string|null} [lookerInstanceUri] LookerExploreReference lookerInstanceUri + * @property {google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo|null} [privateLookerInstanceInfo] LookerExploreReference privateLookerInstanceInfo + * @property {string|null} [lookmlModel] LookerExploreReference lookmlModel + * @property {string|null} [explore] LookerExploreReference explore + * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] LookerExploreReference schema + */ + + /** + * Constructs a new LookerExploreReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a LookerExploreReference. + * @implements ILookerExploreReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReference=} [properties] Properties to set + */ + function LookerExploreReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerExploreReference lookerInstanceUri. + * @member {string|null|undefined} lookerInstanceUri + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.lookerInstanceUri = null; + + /** + * LookerExploreReference privateLookerInstanceInfo. + * @member {google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo|null|undefined} privateLookerInstanceInfo + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.privateLookerInstanceInfo = null; + + /** + * LookerExploreReference lookmlModel. + * @member {string} lookmlModel + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.lookmlModel = ""; + + /** + * LookerExploreReference explore. + * @member {string} explore + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.explore = ""; + + /** + * LookerExploreReference schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @instance + */ + LookerExploreReference.prototype.schema = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LookerExploreReference instance. + * @member {"lookerInstanceUri"|"privateLookerInstanceInfo"|undefined} instance + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @instance + */ + Object.defineProperty(LookerExploreReference.prototype, "instance", { + get: $util.oneOfGetter($oneOfFields = ["lookerInstanceUri", "privateLookerInstanceInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LookerExploreReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReference} LookerExploreReference instance + */ + LookerExploreReference.create = function create(properties) { + return new LookerExploreReference(properties); + }; + + /** + * Encodes the specified LookerExploreReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReference} message LookerExploreReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lookmlModel != null && Object.hasOwnProperty.call(message, "lookmlModel")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.lookmlModel); + if (message.explore != null && Object.hasOwnProperty.call(message, "explore")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.explore); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lookerInstanceUri != null && Object.hasOwnProperty.call(message, "lookerInstanceUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.lookerInstanceUri); + if (message.privateLookerInstanceInfo != null && Object.hasOwnProperty.call(message, "privateLookerInstanceInfo")) + $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.encode(message.privateLookerInstanceInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LookerExploreReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerExploreReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerExploreReference} message LookerExploreReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerExploreReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReference} LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 9: { + message.lookerInstanceUri = reader.string(); + break; + } + case 10: { + message.privateLookerInstanceInfo = $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lookmlModel = reader.string(); + break; + } + case 5: { + message.explore = reader.string(); + break; + } + case 8: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerExploreReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReference} LookerExploreReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerExploreReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerExploreReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerExploreReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lookerInstanceUri != null && message.hasOwnProperty("lookerInstanceUri")) { + properties.instance = 1; + if (!$util.isString(message.lookerInstanceUri)) + return "lookerInstanceUri: string expected"; + } + if (message.privateLookerInstanceInfo != null && message.hasOwnProperty("privateLookerInstanceInfo")) { + if (properties.instance === 1) + return "instance: multiple values"; + properties.instance = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.verify(message.privateLookerInstanceInfo); + if (error) + return "privateLookerInstanceInfo." + error; + } + } + if (message.lookmlModel != null && message.hasOwnProperty("lookmlModel")) + if (!$util.isString(message.lookmlModel)) + return "lookmlModel: string expected"; + if (message.explore != null && message.hasOwnProperty("explore")) + if (!$util.isString(message.explore)) + return "explore: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a LookerExploreReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.LookerExploreReference} LookerExploreReference + */ + LookerExploreReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference(); + if (object.lookerInstanceUri != null) + message.lookerInstanceUri = String(object.lookerInstanceUri); + if (object.privateLookerInstanceInfo != null) { + if (typeof object.privateLookerInstanceInfo !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerExploreReference.privateLookerInstanceInfo: object expected"); + message.privateLookerInstanceInfo = $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.fromObject(object.privateLookerInstanceInfo); + } + if (object.lookmlModel != null) + message.lookmlModel = String(object.lookmlModel); + if (object.explore != null) + message.explore = String(object.explore); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerExploreReference.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a LookerExploreReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.LookerExploreReference} message LookerExploreReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerExploreReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lookmlModel = ""; + object.explore = ""; + object.schema = null; + } + if (message.lookmlModel != null && message.hasOwnProperty("lookmlModel")) + object.lookmlModel = message.lookmlModel; + if (message.explore != null && message.hasOwnProperty("explore")) + object.explore = message.explore; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); + if (message.lookerInstanceUri != null && message.hasOwnProperty("lookerInstanceUri")) { + object.lookerInstanceUri = message.lookerInstanceUri; + if (options.oneofs) + object.instance = "lookerInstanceUri"; + } + if (message.privateLookerInstanceInfo != null && message.hasOwnProperty("privateLookerInstanceInfo")) { + object.privateLookerInstanceInfo = $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.toObject(message.privateLookerInstanceInfo, options); + if (options.oneofs) + object.instance = "privateLookerInstanceInfo"; + } + return object; + }; + + /** + * Converts this LookerExploreReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @instance + * @returns {Object.} JSON object + */ + LookerExploreReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerExploreReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.LookerExploreReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerExploreReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.LookerExploreReference"; + }; + + return LookerExploreReference; + })(); + + v1beta.PrivateLookerInstanceInfo = (function() { + + /** + * Properties of a PrivateLookerInstanceInfo. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IPrivateLookerInstanceInfo + * @property {string|null} [lookerInstanceId] PrivateLookerInstanceInfo lookerInstanceId + * @property {string|null} [serviceDirectoryName] PrivateLookerInstanceInfo serviceDirectoryName + */ + + /** + * Constructs a new PrivateLookerInstanceInfo. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a PrivateLookerInstanceInfo. + * @implements IPrivateLookerInstanceInfo + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo=} [properties] Properties to set + */ + function PrivateLookerInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateLookerInstanceInfo lookerInstanceId. + * @member {string} lookerInstanceId + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @instance + */ + PrivateLookerInstanceInfo.prototype.lookerInstanceId = ""; + + /** + * PrivateLookerInstanceInfo serviceDirectoryName. + * @member {string} serviceDirectoryName + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @instance + */ + PrivateLookerInstanceInfo.prototype.serviceDirectoryName = ""; + + /** + * Creates a new PrivateLookerInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo instance + */ + PrivateLookerInstanceInfo.create = function create(properties) { + return new PrivateLookerInstanceInfo(properties); + }; + + /** + * Encodes the specified PrivateLookerInstanceInfo message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo} message PrivateLookerInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateLookerInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lookerInstanceId != null && Object.hasOwnProperty.call(message, "lookerInstanceId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lookerInstanceId); + if (message.serviceDirectoryName != null && Object.hasOwnProperty.call(message, "serviceDirectoryName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceDirectoryName); + return writer; + }; + + /** + * Encodes the specified PrivateLookerInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IPrivateLookerInstanceInfo} message PrivateLookerInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateLookerInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateLookerInstanceInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lookerInstanceId = reader.string(); + break; + } + case 2: { + message.serviceDirectoryName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateLookerInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateLookerInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateLookerInstanceInfo message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateLookerInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lookerInstanceId != null && message.hasOwnProperty("lookerInstanceId")) + if (!$util.isString(message.lookerInstanceId)) + return "lookerInstanceId: string expected"; + if (message.serviceDirectoryName != null && message.hasOwnProperty("serviceDirectoryName")) + if (!$util.isString(message.serviceDirectoryName)) + return "serviceDirectoryName: string expected"; + return null; + }; + + /** + * Creates a PrivateLookerInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo} PrivateLookerInstanceInfo + */ + PrivateLookerInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo(); + if (object.lookerInstanceId != null) + message.lookerInstanceId = String(object.lookerInstanceId); + if (object.serviceDirectoryName != null) + message.serviceDirectoryName = String(object.serviceDirectoryName); + return message; + }; + + /** + * Creates a plain object from a PrivateLookerInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo} message PrivateLookerInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateLookerInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lookerInstanceId = ""; + object.serviceDirectoryName = ""; + } + if (message.lookerInstanceId != null && message.hasOwnProperty("lookerInstanceId")) + object.lookerInstanceId = message.lookerInstanceId; + if (message.serviceDirectoryName != null && message.hasOwnProperty("serviceDirectoryName")) + object.serviceDirectoryName = message.serviceDirectoryName; + return object; + }; + + /** + * Converts this PrivateLookerInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + PrivateLookerInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateLookerInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateLookerInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo"; + }; + + return PrivateLookerInstanceInfo; + })(); + + v1beta.Datasource = (function() { + + /** + * Properties of a Datasource. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDatasource + * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null} [bigqueryTableReference] Datasource bigqueryTableReference + * @property {string|null} [studioDatasourceId] Datasource studioDatasourceId + * @property {google.cloud.geminidataanalytics.v1beta.ILookerExploreReference|null} [lookerExploreReference] Datasource lookerExploreReference + * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] Datasource schema + */ + + /** + * Constructs a new Datasource. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Datasource. + * @implements IDatasource + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDatasource=} [properties] Properties to set + */ + function Datasource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Datasource bigqueryTableReference. + * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null|undefined} bigqueryTableReference + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @instance + */ + Datasource.prototype.bigqueryTableReference = null; + + /** + * Datasource studioDatasourceId. + * @member {string|null|undefined} studioDatasourceId + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @instance + */ + Datasource.prototype.studioDatasourceId = null; + + /** + * Datasource lookerExploreReference. + * @member {google.cloud.geminidataanalytics.v1beta.ILookerExploreReference|null|undefined} lookerExploreReference + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @instance + */ + Datasource.prototype.lookerExploreReference = null; + + /** + * Datasource schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @instance + */ + Datasource.prototype.schema = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Datasource reference. + * @member {"bigqueryTableReference"|"studioDatasourceId"|"lookerExploreReference"|undefined} reference + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @instance + */ + Object.defineProperty(Datasource.prototype, "reference", { + get: $util.oneOfGetter($oneOfFields = ["bigqueryTableReference", "studioDatasourceId", "lookerExploreReference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Datasource instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDatasource=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Datasource} Datasource instance + */ + Datasource.create = function create(properties) { + return new Datasource(properties); + }; + + /** + * Encodes the specified Datasource message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Datasource.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDatasource} message Datasource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Datasource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryTableReference != null && Object.hasOwnProperty.call(message, "bigqueryTableReference")) + $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.encode(message.bigqueryTableReference, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.studioDatasourceId != null && Object.hasOwnProperty.call(message, "studioDatasourceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.studioDatasourceId); + if (message.lookerExploreReference != null && Object.hasOwnProperty.call(message, "lookerExploreReference")) + $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.encode(message.lookerExploreReference, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Datasource message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Datasource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDatasource} message Datasource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Datasource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Datasource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Datasource} Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Datasource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Datasource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bigqueryTableReference = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.decode(reader, reader.uint32()); + break; + } + case 2: { + message.studioDatasourceId = reader.string(); + break; + } + case 4: { + message.lookerExploreReference = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.decode(reader, reader.uint32()); + break; + } + case 7: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Datasource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Datasource} Datasource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Datasource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Datasource message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Datasource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigqueryTableReference != null && message.hasOwnProperty("bigqueryTableReference")) { + properties.reference = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify(message.bigqueryTableReference); + if (error) + return "bigqueryTableReference." + error; + } + } + if (message.studioDatasourceId != null && message.hasOwnProperty("studioDatasourceId")) { + if (properties.reference === 1) + return "reference: multiple values"; + properties.reference = 1; + if (!$util.isString(message.studioDatasourceId)) + return "studioDatasourceId: string expected"; + } + if (message.lookerExploreReference != null && message.hasOwnProperty("lookerExploreReference")) { + if (properties.reference === 1) + return "reference: multiple values"; + properties.reference = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.verify(message.lookerExploreReference); + if (error) + return "lookerExploreReference." + error; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a Datasource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Datasource} Datasource + */ + Datasource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Datasource) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Datasource(); + if (object.bigqueryTableReference != null) { + if (typeof object.bigqueryTableReference !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Datasource.bigqueryTableReference: object expected"); + message.bigqueryTableReference = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.fromObject(object.bigqueryTableReference); + } + if (object.studioDatasourceId != null) + message.studioDatasourceId = String(object.studioDatasourceId); + if (object.lookerExploreReference != null) { + if (typeof object.lookerExploreReference !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Datasource.lookerExploreReference: object expected"); + message.lookerExploreReference = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.fromObject(object.lookerExploreReference); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Datasource.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a Datasource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Datasource} message Datasource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Datasource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.schema = null; + if (message.bigqueryTableReference != null && message.hasOwnProperty("bigqueryTableReference")) { + object.bigqueryTableReference = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.toObject(message.bigqueryTableReference, options); + if (options.oneofs) + object.reference = "bigqueryTableReference"; + } + if (message.studioDatasourceId != null && message.hasOwnProperty("studioDatasourceId")) { + object.studioDatasourceId = message.studioDatasourceId; + if (options.oneofs) + object.reference = "studioDatasourceId"; + } + if (message.lookerExploreReference != null && message.hasOwnProperty("lookerExploreReference")) { + object.lookerExploreReference = $root.google.cloud.geminidataanalytics.v1beta.LookerExploreReference.toObject(message.lookerExploreReference, options); + if (options.oneofs) + object.reference = "lookerExploreReference"; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this Datasource to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @instance + * @returns {Object.} JSON object + */ + Datasource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Datasource + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Datasource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Datasource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Datasource"; + }; + + return Datasource; + })(); + + v1beta.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ISchema + * @property {Array.|null} [fields] Schema fields + * @property {string|null} [description] Schema description + * @property {Array.|null} [synonyms] Schema synonyms + * @property {Array.|null} [tags] Schema tags + * @property {string|null} [displayName] Schema displayName + * @property {Array.|null} [filters] Schema filters + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.fields = []; + this.synonyms = []; + this.tags = []; + this.filters = []; + if (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 fields. + * @member {Array.} fields + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @instance + */ + Schema.prototype.fields = $util.emptyArray; + + /** + * Schema description. + * @member {string} description + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @instance + */ + Schema.prototype.description = ""; + + /** + * Schema synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @instance + */ + Schema.prototype.synonyms = $util.emptyArray; + + /** + * Schema tags. + * @member {Array.} tags + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @instance + */ + Schema.prototype.tags = $util.emptyArray; + + /** + * Schema displayName. + * @member {string} displayName + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @instance + */ + Schema.prototype.displayName = ""; + + /** + * Schema filters. + * @member {Array.} filters + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @instance + */ + Schema.prototype.filters = $util.emptyArray; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchema=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1beta.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.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.synonyms != null && message.synonyms.length) + for (var i = 0; i < message.synonyms.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.synonyms[i]); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tags[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.DataFilter.encode(message.filters[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.geminidataanalytics.v1beta.Field.decode(reader, reader.uint32())); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); + break; + } + case 4: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.cloud.geminidataanalytics.v1beta.DataFilter.decode(reader, reader.uint32())); + 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.geminidataanalytics.v1beta.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.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.geminidataanalytics.v1beta.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.synonyms != null && message.hasOwnProperty("synonyms")) { + if (!Array.isArray(message.synonyms)) + return "synonyms: array expected"; + for (var i = 0; i < message.synonyms.length; ++i) + if (!$util.isString(message.synonyms[i])) + return "synonyms: string[] expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataFilter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Schema) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Schema(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.Schema.fields: object expected"); + message.fields[i] = $root.google.cloud.geminidataanalytics.v1beta.Field.fromObject(object.fields[i]); + } + } + if (object.description != null) + message.description = String(object.description); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Schema.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[i]); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Schema.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Schema.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Schema.filters: object expected"); + message.filters[i] = $root.google.cloud.geminidataanalytics.v1beta.DataFilter.fromObject(object.filters[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @static + * @param {google.cloud.geminidataanalytics.v1beta.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.synonyms = []; + object.tags = []; + object.filters = []; + } + if (options.defaults) { + object.description = ""; + object.displayName = ""; + } + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.geminidataanalytics.v1beta.Field.toObject(message.fields[j], options); + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.synonyms && message.synonyms.length) { + object.synonyms = []; + for (var j = 0; j < message.synonyms.length; ++j) + object.synonyms[j] = message.synonyms[j]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.cloud.geminidataanalytics.v1beta.DataFilter.toObject(message.filters[j], options); + } + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schema + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Schema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Schema"; + }; + + return Schema; + })(); + + v1beta.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IField + * @property {string|null} [name] Field name + * @property {string|null} [type] Field type + * @property {string|null} [description] Field description + * @property {string|null} [mode] Field mode + * @property {Array.|null} [synonyms] Field synonyms + * @property {Array.|null} [tags] Field tags + * @property {string|null} [displayName] Field displayName + * @property {Array.|null} [subfields] Field subfields + * @property {string|null} [category] Field category + * @property {string|null} [valueFormat] Field valueFormat + */ + + /** + * Constructs a new Field. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IField=} [properties] Properties to set + */ + function Field(properties) { + this.synonyms = []; + this.tags = []; + this.subfields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Field name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.name = ""; + + /** + * Field type. + * @member {string} type + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.type = ""; + + /** + * Field description. + * @member {string} description + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.description = ""; + + /** + * Field mode. + * @member {string} mode + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.mode = ""; + + /** + * Field synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.synonyms = $util.emptyArray; + + /** + * Field tags. + * @member {Array.} tags + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.tags = $util.emptyArray; + + /** + * Field displayName. + * @member {string} displayName + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.displayName = ""; + + /** + * Field subfields. + * @member {Array.} subfields + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.subfields = $util.emptyArray; + + /** + * Field category. + * @member {string} category + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.category = ""; + + /** + * Field valueFormat. + * @member {string} valueFormat + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + */ + Field.prototype.valueFormat = ""; + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IField=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Field.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer) { + 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 2 =*/18).string(message.type); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mode); + if (message.synonyms != null && message.synonyms.length) + for (var i = 0; i < message.synonyms.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.synonyms[i]); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tags[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.subfields != null && message.subfields.length) + for (var i = 0; i < message.subfields.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Field.encode(message.subfields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.category); + if (message.valueFormat != null && Object.hasOwnProperty.call(message, "valueFormat")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.valueFormat); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.mode = reader.string(); + break; + } + case 6: { + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); + break; + } + case 7: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 9: { + if (!(message.subfields && message.subfields.length)) + message.subfields = []; + message.subfields.push($root.google.cloud.geminidataanalytics.v1beta.Field.decode(reader, reader.uint32())); + break; + } + case 10: { + message.category = reader.string(); + break; + } + case 11: { + message.valueFormat = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message) { + if (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")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + if (!$util.isString(message.mode)) + return "mode: string expected"; + if (message.synonyms != null && message.hasOwnProperty("synonyms")) { + if (!Array.isArray(message.synonyms)) + return "synonyms: array expected"; + for (var i = 0; i < message.synonyms.length; ++i) + if (!$util.isString(message.synonyms[i])) + return "synonyms: string[] expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.subfields != null && message.hasOwnProperty("subfields")) { + if (!Array.isArray(message.subfields)) + return "subfields: array expected"; + for (var i = 0; i < message.subfields.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Field.verify(message.subfields[i]); + if (error) + return "subfields." + error; + } + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.valueFormat != null && message.hasOwnProperty("valueFormat")) + if (!$util.isString(message.valueFormat)) + return "valueFormat: string expected"; + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Field) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Field(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.description != null) + message.description = String(object.description); + if (object.mode != null) + message.mode = String(object.mode); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Field.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[i]); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Field.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.subfields) { + if (!Array.isArray(object.subfields)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Field.subfields: array expected"); + message.subfields = []; + for (var i = 0; i < object.subfields.length; ++i) { + if (typeof object.subfields[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Field.subfields: object expected"); + message.subfields[i] = $root.google.cloud.geminidataanalytics.v1beta.Field.fromObject(object.subfields[i]); + } + } + if (object.category != null) + message.category = String(object.category); + if (object.valueFormat != null) + message.valueFormat = String(object.valueFormat); + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.synonyms = []; + object.tags = []; + object.subfields = []; + } + if (options.defaults) { + object.name = ""; + object.type = ""; + object.description = ""; + object.mode = ""; + object.displayName = ""; + object.category = ""; + object.valueFormat = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = message.mode; + if (message.synonyms && message.synonyms.length) { + object.synonyms = []; + for (var j = 0; j < message.synonyms.length; ++j) + object.synonyms[j] = message.synonyms[j]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.subfields && message.subfields.length) { + object.subfields = []; + for (var j = 0; j < message.subfields.length; ++j) + object.subfields[j] = $root.google.cloud.geminidataanalytics.v1beta.Field.toObject(message.subfields[j], options); + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.valueFormat != null && message.hasOwnProperty("valueFormat")) + object.valueFormat = message.valueFormat; + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Field"; + }; + + return Field; + })(); + + v1beta.DataFilter = (function() { + + /** + * Properties of a DataFilter. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDataFilter + * @property {string|null} [field] DataFilter field + * @property {string|null} [value] DataFilter value + * @property {google.cloud.geminidataanalytics.v1beta.DataFilterType|null} [type] DataFilter type + */ + + /** + * Constructs a new DataFilter. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataFilter. + * @implements IDataFilter + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDataFilter=} [properties] Properties to set + */ + function DataFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataFilter field. + * @member {string} field + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @instance + */ + DataFilter.prototype.field = ""; + + /** + * DataFilter value. + * @member {string} value + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @instance + */ + DataFilter.prototype.value = ""; + + /** + * DataFilter type. + * @member {google.cloud.geminidataanalytics.v1beta.DataFilterType} type + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @instance + */ + DataFilter.prototype.type = 0; + + /** + * Creates a new DataFilter instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataFilter=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataFilter} DataFilter instance + */ + DataFilter.create = function create(properties) { + return new DataFilter(properties); + }; + + /** + * Encodes the specified DataFilter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataFilter} message DataFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified DataFilter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataFilter} message DataFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DataFilter} DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DataFilter} DataFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataFilter message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a DataFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DataFilter} DataFilter + */ + DataFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataFilter) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataFilter(); + if (object.field != null) + message.field = String(object.field); + if (object.value != null) + message.value = String(object.value); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_FILTER_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ALWAYS_FILTER": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DataFilter} message DataFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.value = ""; + object.type = options.enums === String ? "DATA_FILTER_TYPE_UNSPECIFIED" : 0; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.DataFilterType[message.type] === undefined ? message.type : $root.google.cloud.geminidataanalytics.v1beta.DataFilterType[message.type] : message.type; + return object; + }; + + /** + * Converts this DataFilter to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @instance + * @returns {Object.} JSON object + */ + DataFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataFilter + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DataFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataFilter"; + }; + + return DataFilter; + })(); + + v1beta.Credentials = (function() { + + /** + * Properties of a Credentials. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ICredentials + * @property {google.cloud.geminidataanalytics.v1beta.IOAuthCredentials|null} [oauth] Credentials oauth + */ + + /** + * Constructs a new Credentials. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Credentials. + * @implements ICredentials + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ICredentials=} [properties] Properties to set + */ + function Credentials(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Credentials oauth. + * @member {google.cloud.geminidataanalytics.v1beta.IOAuthCredentials|null|undefined} oauth + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @instance + */ + Credentials.prototype.oauth = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Credentials kind. + * @member {"oauth"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @instance + */ + Object.defineProperty(Credentials.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["oauth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Credentials instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICredentials=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Credentials} Credentials instance + */ + Credentials.create = function create(properties) { + return new Credentials(properties); + }; + + /** + * Encodes the specified Credentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Credentials.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICredentials} message Credentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Credentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oauth != null && Object.hasOwnProperty.call(message, "oauth")) + $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.encode(message.oauth, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Credentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Credentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICredentials} message Credentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Credentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Credentials message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Credentials} Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Credentials.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Credentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.oauth = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Credentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Credentials} Credentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Credentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Credentials message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Credentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.oauth != null && message.hasOwnProperty("oauth")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.verify(message.oauth); + if (error) + return "oauth." + error; + } + } + return null; + }; + + /** + * Creates a Credentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Credentials} Credentials + */ + Credentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Credentials) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Credentials(); + if (object.oauth != null) { + if (typeof object.oauth !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Credentials.oauth: object expected"); + message.oauth = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.fromObject(object.oauth); + } + return message; + }; + + /** + * Creates a plain object from a Credentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Credentials} message Credentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Credentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.oauth != null && message.hasOwnProperty("oauth")) { + object.oauth = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.toObject(message.oauth, options); + if (options.oneofs) + object.kind = "oauth"; + } + return object; + }; + + /** + * Converts this Credentials to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @instance + * @returns {Object.} JSON object + */ + Credentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Credentials + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Credentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Credentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Credentials"; + }; + + return Credentials; + })(); + + v1beta.OAuthCredentials = (function() { + + /** + * Properties of a OAuthCredentials. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IOAuthCredentials + * @property {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased|null} [secret] OAuthCredentials secret + * @property {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased|null} [token] OAuthCredentials token + */ + + /** + * Constructs a new OAuthCredentials. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a OAuthCredentials. + * @implements IOAuthCredentials + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IOAuthCredentials=} [properties] Properties to set + */ + function OAuthCredentials(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OAuthCredentials secret. + * @member {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased|null|undefined} secret + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @instance + */ + OAuthCredentials.prototype.secret = null; + + /** + * OAuthCredentials token. + * @member {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased|null|undefined} token + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @instance + */ + OAuthCredentials.prototype.token = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OAuthCredentials kind. + * @member {"secret"|"token"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @instance + */ + Object.defineProperty(OAuthCredentials.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["secret", "token"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OAuthCredentials instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IOAuthCredentials=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials} OAuthCredentials instance + */ + OAuthCredentials.create = function create(properties) { + return new OAuthCredentials(properties); + }; + + /** + * Encodes the specified OAuthCredentials message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IOAuthCredentials} message OAuthCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthCredentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secret != null && Object.hasOwnProperty.call(message, "secret")) + $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.encode(message.secret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.encode(message.token, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OAuthCredentials message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IOAuthCredentials} message OAuthCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthCredentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials} OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthCredentials.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.secret = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.decode(reader, reader.uint32()); + break; + } + case 3: { + message.token = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OAuthCredentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials} OAuthCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthCredentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OAuthCredentials message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OAuthCredentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.secret != null && message.hasOwnProperty("secret")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.verify(message.secret); + if (error) + return "secret." + error; + } + } + if (message.token != null && message.hasOwnProperty("token")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.verify(message.token); + if (error) + return "token." + error; + } + } + return null; + }; + + /** + * Creates a OAuthCredentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials} OAuthCredentials + */ + OAuthCredentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials(); + if (object.secret != null) { + if (typeof object.secret !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.OAuthCredentials.secret: object expected"); + message.secret = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.fromObject(object.secret); + } + if (object.token != null) { + if (typeof object.token !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.OAuthCredentials.token: object expected"); + message.token = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.fromObject(object.token); + } + return message; + }; + + /** + * Creates a plain object from a OAuthCredentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials} message OAuthCredentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OAuthCredentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.secret != null && message.hasOwnProperty("secret")) { + object.secret = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.toObject(message.secret, options); + if (options.oneofs) + object.kind = "secret"; + } + if (message.token != null && message.hasOwnProperty("token")) { + object.token = $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.toObject(message.token, options); + if (options.oneofs) + object.kind = "token"; + } + return object; + }; + + /** + * Converts this OAuthCredentials to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @instance + * @returns {Object.} JSON object + */ + OAuthCredentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OAuthCredentials + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OAuthCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.OAuthCredentials"; + }; + + OAuthCredentials.SecretBased = (function() { + + /** + * Properties of a SecretBased. + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @interface ISecretBased + * @property {string|null} [clientId] SecretBased clientId + * @property {string|null} [clientSecret] SecretBased clientSecret + */ + + /** + * Constructs a new SecretBased. + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @classdesc Represents a SecretBased. + * @implements ISecretBased + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased=} [properties] Properties to set + */ + function SecretBased(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretBased clientId. + * @member {string} clientId + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @instance + */ + SecretBased.prototype.clientId = ""; + + /** + * SecretBased clientSecret. + * @member {string} clientSecret + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @instance + */ + SecretBased.prototype.clientSecret = ""; + + /** + * Creates a new SecretBased instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased} SecretBased instance + */ + SecretBased.create = function create(properties) { + return new SecretBased(properties); + }; + + /** + * Encodes the specified SecretBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased} message SecretBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretBased.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); + if (message.clientSecret != null && Object.hasOwnProperty.call(message, "clientSecret")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientSecret); + return writer; + }; + + /** + * Encodes the specified SecretBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ISecretBased} message SecretBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretBased.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretBased message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased} SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretBased.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.clientId = reader.string(); + break; + } + case 3: { + message.clientSecret = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretBased message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased} SecretBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretBased.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretBased message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretBased.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + if (!$util.isString(message.clientSecret)) + return "clientSecret: string expected"; + return null; + }; + + /** + * Creates a SecretBased message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased} SecretBased + */ + SecretBased.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientSecret != null) + message.clientSecret = String(object.clientSecret); + return message; + }; + + /** + * Creates a plain object from a SecretBased message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased} message SecretBased + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretBased.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientSecret = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientSecret != null && message.hasOwnProperty("clientSecret")) + object.clientSecret = message.clientSecret; + return object; + }; + + /** + * Converts this SecretBased to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @instance + * @returns {Object.} JSON object + */ + SecretBased.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretBased + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretBased.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased"; + }; + + return SecretBased; + })(); + + OAuthCredentials.TokenBased = (function() { + + /** + * Properties of a TokenBased. + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @interface ITokenBased + * @property {string|null} [accessToken] TokenBased accessToken + */ + + /** + * Constructs a new TokenBased. + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials + * @classdesc Represents a TokenBased. + * @implements ITokenBased + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased=} [properties] Properties to set + */ + function TokenBased(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TokenBased accessToken. + * @member {string} accessToken + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @instance + */ + TokenBased.prototype.accessToken = ""; + + /** + * Creates a new TokenBased instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased} TokenBased instance + */ + TokenBased.create = function create(properties) { + return new TokenBased(properties); + }; + + /** + * Encodes the specified TokenBased message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased} message TokenBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBased.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accessToken); + return writer; + }; + + /** + * Encodes the specified TokenBased message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.ITokenBased} message TokenBased message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBased.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenBased message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased} TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBased.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accessToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenBased message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased} TokenBased + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBased.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenBased message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenBased.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + if (!$util.isString(message.accessToken)) + return "accessToken: string expected"; + return null; + }; + + /** + * Creates a TokenBased message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased} TokenBased + */ + TokenBased.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased(); + if (object.accessToken != null) + message.accessToken = String(object.accessToken); + return message; + }; + + /** + * Creates a plain object from a TokenBased message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased} message TokenBased + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenBased.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accessToken = ""; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + object.accessToken = message.accessToken; + return object; + }; + + /** + * Converts this TokenBased to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @instance + * @returns {Object.} JSON object + */ + TokenBased.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TokenBased + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TokenBased.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased"; + }; + + return TokenBased; + })(); + + return OAuthCredentials; + })(); + + v1beta.Conversation = (function() { + + /** + * Properties of a Conversation. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IConversation + * @property {string|null} [name] Conversation name + * @property {Array.|null} [agents] Conversation agents + * @property {google.protobuf.ITimestamp|null} [createTime] Conversation createTime + * @property {google.protobuf.ITimestamp|null} [lastUsedTime] Conversation lastUsedTime + * @property {Object.|null} [labels] Conversation labels + */ + + /** + * Constructs a new Conversation. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Conversation. + * @implements IConversation + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IConversation=} [properties] Properties to set + */ + function Conversation(properties) { + this.agents = []; + 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]]; + } + + /** + * Conversation name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @instance + */ + Conversation.prototype.name = ""; + + /** + * Conversation agents. + * @member {Array.} agents + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @instance + */ + Conversation.prototype.agents = $util.emptyArray; + + /** + * Conversation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @instance + */ + Conversation.prototype.createTime = null; + + /** + * Conversation lastUsedTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUsedTime + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @instance + */ + Conversation.prototype.lastUsedTime = null; + + /** + * Conversation labels. + * @member {Object.} labels + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @instance + */ + Conversation.prototype.labels = $util.emptyObject; + + /** + * Creates a new Conversation instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversation=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Conversation} Conversation instance + */ + Conversation.create = function create(properties) { + return new Conversation(properties); + }; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Conversation.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encode = function encode(message, writer) { + 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.agents != null && message.agents.length) + for (var i = 0; i < message.agents.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agents[i]); + 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.lastUsedTime != null && Object.hasOwnProperty.call(message, "lastUsedTime")) + $root.google.protobuf.Timestamp.encode(message.lastUsedTime, writer.uint32(/* id 4, wireType 2 =*/34).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 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Conversation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Conversation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.agents && message.agents.length)) + message.agents = []; + message.agents.push(reader.string()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastUsedTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Conversation message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Conversation.verify = function verify(message) { + if (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.agents != null && message.hasOwnProperty("agents")) { + if (!Array.isArray(message.agents)) + return "agents: array expected"; + for (var i = 0; i < message.agents.length; ++i) + if (!$util.isString(message.agents[i])) + return "agents: 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.lastUsedTime != null && message.hasOwnProperty("lastUsedTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUsedTime); + if (error) + return "lastUsedTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Conversation} Conversation + */ + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Conversation) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Conversation(); + if (object.name != null) + message.name = String(object.name); + if (object.agents) { + if (!Array.isArray(object.agents)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Conversation.agents: array expected"); + message.agents = []; + for (var i = 0; i < object.agents.length; ++i) + message.agents[i] = String(object.agents[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Conversation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUsedTime != null) { + if (typeof object.lastUsedTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Conversation.lastUsedTime: object expected"); + message.lastUsedTime = $root.google.protobuf.Timestamp.fromObject(object.lastUsedTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Conversation.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Conversation} message Conversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Conversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.agents = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.lastUsedTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.agents && message.agents.length) { + object.agents = []; + for (var j = 0; j < message.agents.length; ++j) + object.agents[j] = message.agents[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUsedTime != null && message.hasOwnProperty("lastUsedTime")) + object.lastUsedTime = $root.google.protobuf.Timestamp.toObject(message.lastUsedTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this Conversation to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @instance + * @returns {Object.} JSON object + */ + Conversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Conversation + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Conversation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Conversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Conversation"; + }; + + return Conversation; + })(); + + v1beta.CreateConversationRequest = (function() { + + /** + * Properties of a CreateConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ICreateConversationRequest + * @property {string|null} [parent] CreateConversationRequest parent + * @property {string|null} [conversationId] CreateConversationRequest conversationId + * @property {google.cloud.geminidataanalytics.v1beta.IConversation|null} [conversation] CreateConversationRequest conversation + * @property {string|null} [requestId] CreateConversationRequest requestId + */ + + /** + * Constructs a new CreateConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a CreateConversationRequest. + * @implements ICreateConversationRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest=} [properties] Properties to set + */ + function CreateConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConversationRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.parent = ""; + + /** + * CreateConversationRequest conversationId. + * @member {string} conversationId + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversationId = ""; + + /** + * CreateConversationRequest conversation. + * @member {google.cloud.geminidataanalytics.v1beta.IConversation|null|undefined} conversation + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversation = null; + + /** + * CreateConversationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.CreateConversationRequest} CreateConversationRequest instance + */ + CreateConversationRequest.create = function create(properties) { + return new CreateConversationRequest(properties); + }; + + /** + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationRequest.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.conversationId != null && Object.hasOwnProperty.call(message, "conversationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversationId); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + $root.google.cloud.geminidataanalytics.v1beta.Conversation.encode(message.conversation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.CreateConversationRequest} CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.conversationId = reader.string(); + break; + } + case 3: { + message.conversation = $root.google.cloud.geminidataanalytics.v1beta.Conversation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.CreateConversationRequest} CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConversationRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConversationRequest.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.conversationId != null && message.hasOwnProperty("conversationId")) + if (!$util.isString(message.conversationId)) + return "conversationId: string expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Conversation.verify(message.conversation); + if (error) + return "conversation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.CreateConversationRequest} CreateConversationRequest + */ + CreateConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversationId != null) + message.conversationId = String(object.conversationId); + if (object.conversation != null) { + if (typeof object.conversation !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.CreateConversationRequest.conversation: object expected"); + message.conversation = $root.google.cloud.geminidataanalytics.v1beta.Conversation.fromObject(object.conversation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.CreateConversationRequest} message CreateConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConversationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.conversationId = ""; + object.conversation = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + object.conversationId = message.conversationId; + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = $root.google.cloud.geminidataanalytics.v1beta.Conversation.toObject(message.conversation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConversationRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.CreateConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.CreateConversationRequest"; + }; + + return CreateConversationRequest; + })(); + + v1beta.GetConversationRequest = (function() { + + /** + * Properties of a GetConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IGetConversationRequest + * @property {string|null} [name] GetConversationRequest name + */ + + /** + * Constructs a new GetConversationRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a GetConversationRequest. + * @implements IGetConversationRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IGetConversationRequest=} [properties] Properties to set + */ + function GetConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConversationRequest name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @instance + */ + GetConversationRequest.prototype.name = ""; + + /** + * Creates a new GetConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IGetConversationRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.GetConversationRequest} GetConversationRequest instance + */ + GetConversationRequest.create = function create(properties) { + return new GetConversationRequest(properties); + }; + + /** + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationRequest.encode = function encode(message, writer) { + 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 GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.GetConversationRequest} GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.GetConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.GetConversationRequest} GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConversationRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConversationRequest.verify = function verify(message) { + if (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 GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.GetConversationRequest} GetConversationRequest + */ + GetConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.GetConversationRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.GetConversationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.GetConversationRequest} message GetConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConversationRequest.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 GetConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @instance + * @returns {Object.} JSON object + */ + GetConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConversationRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.GetConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.GetConversationRequest"; + }; + + return GetConversationRequest; + })(); + + v1beta.ListConversationsRequest = (function() { + + /** + * Properties of a ListConversationsRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListConversationsRequest + * @property {string|null} [parent] ListConversationsRequest parent + * @property {number|null} [pageSize] ListConversationsRequest pageSize + * @property {string|null} [pageToken] ListConversationsRequest pageToken + * @property {string|null} [filter] ListConversationsRequest filter + */ + + /** + * Constructs a new ListConversationsRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListConversationsRequest. + * @implements IListConversationsRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsRequest=} [properties] Properties to set + */ + function ListConversationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversationsRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.parent = ""; + + /** + * ListConversationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.pageSize = 0; + + /** + * ListConversationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.pageToken = ""; + + /** + * ListConversationsRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.filter = ""; + + /** + * Creates a new ListConversationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsRequest} ListConversationsRequest instance + */ + ListConversationsRequest.create = function create(properties) { + return new ListConversationsRequest(properties); + }; + + /** + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsRequest.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 ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsRequest} ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsRequest} ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversationsRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationsRequest.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 ListConversationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsRequest} ListConversationsRequest + */ + ListConversationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest(); + 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 ListConversationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListConversationsRequest} message ListConversationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationsRequest.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 ListConversationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConversationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversationsRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListConversationsRequest"; + }; + + return ListConversationsRequest; + })(); + + v1beta.ListConversationsResponse = (function() { + + /** + * Properties of a ListConversationsResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListConversationsResponse + * @property {Array.|null} [conversations] ListConversationsResponse conversations + * @property {string|null} [nextPageToken] ListConversationsResponse nextPageToken + */ + + /** + * Constructs a new ListConversationsResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListConversationsResponse. + * @implements IListConversationsResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsResponse=} [properties] Properties to set + */ + function ListConversationsResponse(properties) { + this.conversations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversationsResponse conversations. + * @member {Array.} conversations + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @instance + */ + ListConversationsResponse.prototype.conversations = $util.emptyArray; + + /** + * ListConversationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @instance + */ + ListConversationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConversationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsResponse} ListConversationsResponse instance + */ + ListConversationsResponse.create = function create(properties) { + return new ListConversationsResponse(properties); + }; + + /** + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversations != null && message.conversations.length) + for (var i = 0; i < message.conversations.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Conversation.encode(message.conversations[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 ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListConversationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsResponse} ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.google.cloud.geminidataanalytics.v1beta.Conversation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsResponse} ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversationsResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversations != null && message.hasOwnProperty("conversations")) { + if (!Array.isArray(message.conversations)) + return "conversations: array expected"; + for (var i = 0; i < message.conversations.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Conversation.verify(message.conversations[i]); + if (error) + return "conversations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListConversationsResponse} ListConversationsResponse + */ + ListConversationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse(); + if (object.conversations) { + if (!Array.isArray(object.conversations)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListConversationsResponse.conversations: array expected"); + message.conversations = []; + for (var i = 0; i < object.conversations.length; ++i) { + if (typeof object.conversations[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListConversationsResponse.conversations: object expected"); + message.conversations[i] = $root.google.cloud.geminidataanalytics.v1beta.Conversation.fromObject(object.conversations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListConversationsResponse} message ListConversationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conversations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversations && message.conversations.length) { + object.conversations = []; + for (var j = 0; j < message.conversations.length; ++j) + object.conversations[j] = $root.google.cloud.geminidataanalytics.v1beta.Conversation.toObject(message.conversations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConversationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConversationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversationsResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListConversationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListConversationsResponse"; + }; + + return ListConversationsResponse; + })(); + + v1beta.DataAgent = (function() { + + /** + * Properties of a DataAgent. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDataAgent + * @property {google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent|null} [dataAnalyticsAgent] DataAgent dataAnalyticsAgent + * @property {string|null} [name] DataAgent name + * @property {string|null} [displayName] DataAgent displayName + * @property {string|null} [description] DataAgent description + * @property {Object.|null} [labels] DataAgent labels + * @property {google.protobuf.ITimestamp|null} [createTime] DataAgent createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataAgent updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] DataAgent deleteTime + * @property {google.protobuf.ITimestamp|null} [purgeTime] DataAgent purgeTime + */ + + /** + * Constructs a new DataAgent. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataAgent. + * @implements IDataAgent + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgent=} [properties] Properties to set + */ + function DataAgent(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]]; + } + + /** + * DataAgent dataAnalyticsAgent. + * @member {google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent|null|undefined} dataAnalyticsAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.dataAnalyticsAgent = null; + + /** + * DataAgent name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.name = ""; + + /** + * DataAgent displayName. + * @member {string} displayName + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.displayName = ""; + + /** + * DataAgent description. + * @member {string} description + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.description = ""; + + /** + * DataAgent labels. + * @member {Object.} labels + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.labels = $util.emptyObject; + + /** + * DataAgent createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.createTime = null; + + /** + * DataAgent updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.updateTime = null; + + /** + * DataAgent deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.deleteTime = null; + + /** + * DataAgent purgeTime. + * @member {google.protobuf.ITimestamp|null|undefined} purgeTime + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + DataAgent.prototype.purgeTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataAgent type. + * @member {"dataAnalyticsAgent"|undefined} type + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + */ + Object.defineProperty(DataAgent.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["dataAnalyticsAgent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataAgent instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgent=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgent} DataAgent instance + */ + DataAgent.create = function create(properties) { + return new DataAgent(properties); + }; + + /** + * Encodes the specified DataAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgent.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgent} message DataAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgent.encode = function encode(message, writer) { + 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 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.purgeTime != null && Object.hasOwnProperty.call(message, "purgeTime")) + $root.google.protobuf.Timestamp.encode(message.purgeTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.dataAnalyticsAgent != null && Object.hasOwnProperty.call(message, "dataAnalyticsAgent")) + $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.encode(message.dataAnalyticsAgent, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgent} message DataAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAgent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgent} DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgent(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 101: { + message.dataAnalyticsAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.purgeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAgent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgent} DataAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAgent message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAgent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataAnalyticsAgent != null && message.hasOwnProperty("dataAnalyticsAgent")) { + properties.type = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.verify(message.dataAnalyticsAgent); + if (error) + return "dataAnalyticsAgent." + error; + } + } + 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.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.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.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.purgeTime != null && message.hasOwnProperty("purgeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.purgeTime); + if (error) + return "purgeTime." + error; + } + return null; + }; + + /** + * Creates a DataAgent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgent} DataAgent + */ + DataAgent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataAgent) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgent(); + if (object.dataAnalyticsAgent != null) { + if (typeof object.dataAnalyticsAgent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgent.dataAnalyticsAgent: object expected"); + message.dataAnalyticsAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.fromObject(object.dataAnalyticsAgent); + } + 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.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgent.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgent.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.geminidataanalytics.v1beta.DataAgent.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgent.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.purgeTime != null) { + if (typeof object.purgeTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgent.purgeTime: object expected"); + message.purgeTime = $root.google.protobuf.Timestamp.fromObject(object.purgeTime); + } + return message; + }; + + /** + * Creates a plain object from a DataAgent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DataAgent} message DataAgent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAgent.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.description = ""; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.purgeTime = 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; + 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.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.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.purgeTime != null && message.hasOwnProperty("purgeTime")) + object.purgeTime = $root.google.protobuf.Timestamp.toObject(message.purgeTime, options); + if (message.dataAnalyticsAgent != null && message.hasOwnProperty("dataAnalyticsAgent")) { + object.dataAnalyticsAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.toObject(message.dataAnalyticsAgent, options); + if (options.oneofs) + object.type = "dataAnalyticsAgent"; + } + return object; + }; + + /** + * Converts this DataAgent to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @instance + * @returns {Object.} JSON object + */ + DataAgent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAgent + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAgent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataAgent"; + }; + + return DataAgent; + })(); + + v1beta.DataAnalyticsAgent = (function() { + + /** + * Properties of a DataAnalyticsAgent. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDataAnalyticsAgent + * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [stagingContext] DataAnalyticsAgent stagingContext + * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [publishedContext] DataAnalyticsAgent publishedContext + * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [lastPublishedContext] DataAnalyticsAgent lastPublishedContext + */ + + /** + * Constructs a new DataAnalyticsAgent. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataAnalyticsAgent. + * @implements IDataAnalyticsAgent + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent=} [properties] Properties to set + */ + function DataAnalyticsAgent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataAnalyticsAgent stagingContext. + * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} stagingContext + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @instance + */ + DataAnalyticsAgent.prototype.stagingContext = null; + + /** + * DataAnalyticsAgent publishedContext. + * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} publishedContext + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @instance + */ + DataAnalyticsAgent.prototype.publishedContext = null; + + /** + * DataAnalyticsAgent lastPublishedContext. + * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} lastPublishedContext + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @instance + */ + DataAnalyticsAgent.prototype.lastPublishedContext = null; + + /** + * Creates a new DataAnalyticsAgent instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent} DataAnalyticsAgent instance + */ + DataAnalyticsAgent.create = function create(properties) { + return new DataAnalyticsAgent(properties); + }; + + /** + * Encodes the specified DataAnalyticsAgent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent} message DataAnalyticsAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAnalyticsAgent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stagingContext != null && Object.hasOwnProperty.call(message, "stagingContext")) + $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.stagingContext, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.publishedContext != null && Object.hasOwnProperty.call(message, "publishedContext")) + $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.publishedContext, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastPublishedContext != null && Object.hasOwnProperty.call(message, "lastPublishedContext")) + $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.lastPublishedContext, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataAnalyticsAgent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAnalyticsAgent} message DataAnalyticsAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAnalyticsAgent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent} DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAnalyticsAgent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + message.stagingContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); + break; + } + case 6: { + message.publishedContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastPublishedContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAnalyticsAgent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent} DataAnalyticsAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAnalyticsAgent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAnalyticsAgent message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAnalyticsAgent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stagingContext != null && message.hasOwnProperty("stagingContext")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.stagingContext); + if (error) + return "stagingContext." + error; + } + if (message.publishedContext != null && message.hasOwnProperty("publishedContext")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.publishedContext); + if (error) + return "publishedContext." + error; + } + if (message.lastPublishedContext != null && message.hasOwnProperty("lastPublishedContext")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.lastPublishedContext); + if (error) + return "lastPublishedContext." + error; + } + return null; + }; + + /** + * Creates a DataAnalyticsAgent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent} DataAnalyticsAgent + */ + DataAnalyticsAgent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent(); + if (object.stagingContext != null) { + if (typeof object.stagingContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.stagingContext: object expected"); + message.stagingContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.stagingContext); + } + if (object.publishedContext != null) { + if (typeof object.publishedContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.publishedContext: object expected"); + message.publishedContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.publishedContext); + } + if (object.lastPublishedContext != null) { + if (typeof object.lastPublishedContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent.lastPublishedContext: object expected"); + message.lastPublishedContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.lastPublishedContext); + } + return message; + }; + + /** + * Creates a plain object from a DataAnalyticsAgent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent} message DataAnalyticsAgent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAnalyticsAgent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.stagingContext = null; + object.publishedContext = null; + object.lastPublishedContext = null; + } + if (message.stagingContext != null && message.hasOwnProperty("stagingContext")) + object.stagingContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.stagingContext, options); + if (message.publishedContext != null && message.hasOwnProperty("publishedContext")) + object.publishedContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.publishedContext, options); + if (message.lastPublishedContext != null && message.hasOwnProperty("lastPublishedContext")) + object.lastPublishedContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.lastPublishedContext, options); + return object; + }; + + /** + * Converts this DataAnalyticsAgent to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @instance + * @returns {Object.} JSON object + */ + DataAnalyticsAgent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAnalyticsAgent + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAnalyticsAgent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent"; + }; + + return DataAnalyticsAgent; + })(); + + v1beta.DataAgentService = (function() { + + /** + * Constructs a new DataAgentService service. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataAgentService + * @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 DataAgentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataAgentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataAgentService; + + /** + * Creates new DataAgentService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @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 {DataAgentService} RPC service. Useful where requests and/or responses are streamed. + */ + DataAgentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|listDataAgents}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef ListDataAgentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse} [response] ListDataAgentsResponse + */ + + /** + * Calls ListDataAgents. + * @function listDataAgents + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest} request ListDataAgentsRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.ListDataAgentsCallback} callback Node-style callback called with the error, if any, and ListDataAgentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.listDataAgents = function listDataAgents(request, callback) { + return this.rpcCall(listDataAgents, $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest, $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse, request, callback); + }, "name", { value: "ListDataAgents" }); + + /** + * Calls ListDataAgents. + * @function listDataAgents + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest} request ListDataAgentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|listAccessibleDataAgents}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef ListAccessibleDataAgentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse} [response] ListAccessibleDataAgentsResponse + */ + + /** + * Calls ListAccessibleDataAgents. + * @function listAccessibleDataAgents + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest} request ListAccessibleDataAgentsRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.ListAccessibleDataAgentsCallback} callback Node-style callback called with the error, if any, and ListAccessibleDataAgentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.listAccessibleDataAgents = function listAccessibleDataAgents(request, callback) { + return this.rpcCall(listAccessibleDataAgents, $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest, $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse, request, callback); + }, "name", { value: "ListAccessibleDataAgents" }); + + /** + * Calls ListAccessibleDataAgents. + * @function listAccessibleDataAgents + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest} request ListAccessibleDataAgentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|getDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef GetDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.DataAgent} [response] DataAgent + */ + + /** + * Calls GetDataAgent. + * @function getDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest} request GetDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.GetDataAgentCallback} callback Node-style callback called with the error, if any, and DataAgent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.getDataAgent = function getDataAgent(request, callback) { + return this.rpcCall(getDataAgent, $root.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest, $root.google.cloud.geminidataanalytics.v1beta.DataAgent, request, callback); + }, "name", { value: "GetDataAgent" }); + + /** + * Calls GetDataAgent. + * @function getDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest} request GetDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|createDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef CreateDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDataAgent. + * @function createDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest} request CreateDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.CreateDataAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.createDataAgent = function createDataAgent(request, callback) { + return this.rpcCall(createDataAgent, $root.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDataAgent" }); + + /** + * Calls CreateDataAgent. + * @function createDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest} request CreateDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|updateDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef UpdateDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataAgent. + * @function updateDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest} request UpdateDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.UpdateDataAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.updateDataAgent = function updateDataAgent(request, callback) { + return this.rpcCall(updateDataAgent, $root.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataAgent" }); + + /** + * Calls UpdateDataAgent. + * @function updateDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest} request UpdateDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|deleteDataAgent}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef DeleteDataAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDataAgent. + * @function deleteDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest} request DeleteDataAgentRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.DeleteDataAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.deleteDataAgent = function deleteDataAgent(request, callback) { + return this.rpcCall(deleteDataAgent, $root.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataAgent" }); + + /** + * Calls DeleteDataAgent. + * @function deleteDataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest} request DeleteDataAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|getIamPolicy}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataAgentService|setIamPolicy}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataAgentService.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataAgentService; + })(); + + v1beta.ListDataAgentsRequest = (function() { + + /** + * Properties of a ListDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListDataAgentsRequest + * @property {string|null} [parent] ListDataAgentsRequest parent + * @property {number|null} [pageSize] ListDataAgentsRequest pageSize + * @property {string|null} [pageToken] ListDataAgentsRequest pageToken + * @property {string|null} [filter] ListDataAgentsRequest filter + * @property {string|null} [orderBy] ListDataAgentsRequest orderBy + * @property {boolean|null} [showDeleted] ListDataAgentsRequest showDeleted + */ + + /** + * Constructs a new ListDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListDataAgentsRequest. + * @implements IListDataAgentsRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest=} [properties] Properties to set + */ + function ListDataAgentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAgentsRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.parent = ""; + + /** + * ListDataAgentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.pageSize = 0; + + /** + * ListDataAgentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.pageToken = ""; + + /** + * ListDataAgentsRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.filter = ""; + + /** + * ListDataAgentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.orderBy = ""; + + /** + * ListDataAgentsRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @instance + */ + ListDataAgentsRequest.prototype.showDeleted = false; + + /** + * Creates a new ListDataAgentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest} ListDataAgentsRequest instance + */ + ListDataAgentsRequest.create = function create(properties) { + return new ListDataAgentsRequest(properties); + }; + + /** + * Encodes the specified ListDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest} message ListDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsRequest.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); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showDeleted); + return writer; + }; + + /** + * Encodes the specified ListDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest} message ListDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest} ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.showDeleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAgentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest} ListDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAgentsRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAgentsRequest.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"; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + return null; + }; + + /** + * Creates a ListDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest} ListDataAgentsRequest + */ + ListDataAgentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest(); + 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); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + return message; + }; + + /** + * Creates a plain object from a ListDataAgentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest} message ListDataAgentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAgentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.showDeleted = false; + } + 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; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + return object; + }; + + /** + * Converts this ListDataAgentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataAgentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAgentsRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAgentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest"; + }; + + return ListDataAgentsRequest; + })(); + + v1beta.ListDataAgentsResponse = (function() { + + /** + * Properties of a ListDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListDataAgentsResponse + * @property {Array.|null} [dataAgents] ListDataAgentsResponse dataAgents + * @property {string|null} [nextPageToken] ListDataAgentsResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataAgentsResponse unreachable + */ + + /** + * Constructs a new ListDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListDataAgentsResponse. + * @implements IListDataAgentsResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse=} [properties] Properties to set + */ + function ListDataAgentsResponse(properties) { + this.dataAgents = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAgentsResponse dataAgents. + * @member {Array.} dataAgents + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @instance + */ + ListDataAgentsResponse.prototype.dataAgents = $util.emptyArray; + + /** + * ListDataAgentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @instance + */ + ListDataAgentsResponse.prototype.nextPageToken = ""; + + /** + * ListDataAgentsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @instance + */ + ListDataAgentsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataAgentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse} ListDataAgentsResponse instance + */ + ListDataAgentsResponse.create = function create(properties) { + return new ListDataAgentsResponse(properties); + }; + + /** + * Encodes the specified ListDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse} message ListDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAgents != null && message.dataAgents.length) + for (var i = 0; i < message.dataAgents.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.DataAgent.encode(message.dataAgents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse} message ListDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse} ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataAgents && message.dataAgents.length)) + message.dataAgents = []; + message.dataAgents.push($root.google.cloud.geminidataanalytics.v1beta.DataAgent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAgentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse} ListDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAgentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAgentsResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAgentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAgents != null && message.hasOwnProperty("dataAgents")) { + if (!Array.isArray(message.dataAgents)) + return "dataAgents: array expected"; + for (var i = 0; i < message.dataAgents.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.verify(message.dataAgents[i]); + if (error) + return "dataAgents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse} ListDataAgentsResponse + */ + ListDataAgentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse(); + if (object.dataAgents) { + if (!Array.isArray(object.dataAgents)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse.dataAgents: array expected"); + message.dataAgents = []; + for (var i = 0; i < object.dataAgents.length; ++i) { + if (typeof object.dataAgents[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse.dataAgents: object expected"); + message.dataAgents[i] = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.fromObject(object.dataAgents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListDataAgentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse} message ListDataAgentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAgentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataAgents = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataAgents && message.dataAgents.length) { + object.dataAgents = []; + for (var j = 0; j < message.dataAgents.length; ++j) + object.dataAgents[j] = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.toObject(message.dataAgents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListDataAgentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataAgentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAgentsResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAgentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse"; + }; + + return ListDataAgentsResponse; + })(); + + v1beta.ListAccessibleDataAgentsRequest = (function() { + + /** + * Properties of a ListAccessibleDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListAccessibleDataAgentsRequest + * @property {string|null} [parent] ListAccessibleDataAgentsRequest parent + * @property {number|null} [pageSize] ListAccessibleDataAgentsRequest pageSize + * @property {string|null} [pageToken] ListAccessibleDataAgentsRequest pageToken + * @property {string|null} [filter] ListAccessibleDataAgentsRequest filter + * @property {string|null} [orderBy] ListAccessibleDataAgentsRequest orderBy + * @property {boolean|null} [showDeleted] ListAccessibleDataAgentsRequest showDeleted + * @property {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter|null} [creatorFilter] ListAccessibleDataAgentsRequest creatorFilter + */ + + /** + * Constructs a new ListAccessibleDataAgentsRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListAccessibleDataAgentsRequest. + * @implements IListAccessibleDataAgentsRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest=} [properties] Properties to set + */ + function ListAccessibleDataAgentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccessibleDataAgentsRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.parent = ""; + + /** + * ListAccessibleDataAgentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.pageSize = 0; + + /** + * ListAccessibleDataAgentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.pageToken = ""; + + /** + * ListAccessibleDataAgentsRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.filter = ""; + + /** + * ListAccessibleDataAgentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.orderBy = ""; + + /** + * ListAccessibleDataAgentsRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.showDeleted = false; + + /** + * ListAccessibleDataAgentsRequest creatorFilter. + * @member {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter} creatorFilter + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + */ + ListAccessibleDataAgentsRequest.prototype.creatorFilter = 0; + + /** + * Creates a new ListAccessibleDataAgentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest instance + */ + ListAccessibleDataAgentsRequest.create = function create(properties) { + return new ListAccessibleDataAgentsRequest(properties); + }; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest} message ListAccessibleDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsRequest.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); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showDeleted); + if (message.creatorFilter != null && Object.hasOwnProperty.call(message, "creatorFilter")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creatorFilter); + return writer; + }; + + /** + * Encodes the specified ListAccessibleDataAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest} message ListAccessibleDataAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.showDeleted = reader.bool(); + break; + } + case 7: { + message.creatorFilter = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccessibleDataAgentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccessibleDataAgentsRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccessibleDataAgentsRequest.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"; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + if (message.creatorFilter != null && message.hasOwnProperty("creatorFilter")) + switch (message.creatorFilter) { + default: + return "creatorFilter: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ListAccessibleDataAgentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest} ListAccessibleDataAgentsRequest + */ + ListAccessibleDataAgentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest(); + 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); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + switch (object.creatorFilter) { + default: + if (typeof object.creatorFilter === "number") { + message.creatorFilter = object.creatorFilter; + break; + } + break; + case "CREATOR_FILTER_UNSPECIFIED": + case 0: + message.creatorFilter = 0; + break; + case "NONE": + case 1: + message.creatorFilter = 1; + break; + case "CREATOR_ONLY": + case 2: + message.creatorFilter = 2; + break; + case "NOT_CREATOR_ONLY": + case 3: + message.creatorFilter = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListAccessibleDataAgentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest} message ListAccessibleDataAgentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccessibleDataAgentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.showDeleted = false; + object.creatorFilter = options.enums === String ? "CREATOR_FILTER_UNSPECIFIED" : 0; + } + 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; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + if (message.creatorFilter != null && message.hasOwnProperty("creatorFilter")) + object.creatorFilter = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter[message.creatorFilter] === undefined ? message.creatorFilter : $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter[message.creatorFilter] : message.creatorFilter; + return object; + }; + + /** + * Converts this ListAccessibleDataAgentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAccessibleDataAgentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccessibleDataAgentsRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccessibleDataAgentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest"; + }; + + /** + * CreatorFilter enum. + * @name google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter + * @enum {number} + * @property {number} CREATOR_FILTER_UNSPECIFIED=0 CREATOR_FILTER_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} CREATOR_ONLY=2 CREATOR_ONLY value + * @property {number} NOT_CREATOR_ONLY=3 NOT_CREATOR_ONLY value + */ + ListAccessibleDataAgentsRequest.CreatorFilter = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CREATOR_FILTER_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "CREATOR_ONLY"] = 2; + values[valuesById[3] = "NOT_CREATOR_ONLY"] = 3; + return values; + })(); + + return ListAccessibleDataAgentsRequest; + })(); + + v1beta.ListAccessibleDataAgentsResponse = (function() { + + /** + * Properties of a ListAccessibleDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListAccessibleDataAgentsResponse + * @property {Array.|null} [dataAgents] ListAccessibleDataAgentsResponse dataAgents + * @property {string|null} [nextPageToken] ListAccessibleDataAgentsResponse nextPageToken + * @property {Array.|null} [unreachable] ListAccessibleDataAgentsResponse unreachable + */ + + /** + * Constructs a new ListAccessibleDataAgentsResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListAccessibleDataAgentsResponse. + * @implements IListAccessibleDataAgentsResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse=} [properties] Properties to set + */ + function ListAccessibleDataAgentsResponse(properties) { + this.dataAgents = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccessibleDataAgentsResponse dataAgents. + * @member {Array.} dataAgents + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @instance + */ + ListAccessibleDataAgentsResponse.prototype.dataAgents = $util.emptyArray; + + /** + * ListAccessibleDataAgentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @instance + */ + ListAccessibleDataAgentsResponse.prototype.nextPageToken = ""; + + /** + * ListAccessibleDataAgentsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @instance + */ + ListAccessibleDataAgentsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListAccessibleDataAgentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse instance + */ + ListAccessibleDataAgentsResponse.create = function create(properties) { + return new ListAccessibleDataAgentsResponse(properties); + }; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse} message ListAccessibleDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAgents != null && message.dataAgents.length) + for (var i = 0; i < message.dataAgents.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.DataAgent.encode(message.dataAgents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListAccessibleDataAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse} message ListAccessibleDataAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccessibleDataAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataAgents && message.dataAgents.length)) + message.dataAgents = []; + message.dataAgents.push($root.google.cloud.geminidataanalytics.v1beta.DataAgent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccessibleDataAgentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccessibleDataAgentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccessibleDataAgentsResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccessibleDataAgentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAgents != null && message.hasOwnProperty("dataAgents")) { + if (!Array.isArray(message.dataAgents)) + return "dataAgents: array expected"; + for (var i = 0; i < message.dataAgents.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.verify(message.dataAgents[i]); + if (error) + return "dataAgents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListAccessibleDataAgentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse} ListAccessibleDataAgentsResponse + */ + ListAccessibleDataAgentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse(); + if (object.dataAgents) { + if (!Array.isArray(object.dataAgents)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse.dataAgents: array expected"); + message.dataAgents = []; + for (var i = 0; i < object.dataAgents.length; ++i) { + if (typeof object.dataAgents[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse.dataAgents: object expected"); + message.dataAgents[i] = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.fromObject(object.dataAgents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListAccessibleDataAgentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse} message ListAccessibleDataAgentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccessibleDataAgentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataAgents = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataAgents && message.dataAgents.length) { + object.dataAgents = []; + for (var j = 0; j < message.dataAgents.length; ++j) + object.dataAgents[j] = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.toObject(message.dataAgents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListAccessibleDataAgentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAccessibleDataAgentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccessibleDataAgentsResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccessibleDataAgentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse"; + }; + + return ListAccessibleDataAgentsResponse; + })(); + + v1beta.GetDataAgentRequest = (function() { + + /** + * Properties of a GetDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IGetDataAgentRequest + * @property {string|null} [name] GetDataAgentRequest name + */ + + /** + * Constructs a new GetDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a GetDataAgentRequest. + * @implements IGetDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest=} [properties] Properties to set + */ + function GetDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataAgentRequest name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @instance + */ + GetDataAgentRequest.prototype.name = ""; + + /** + * Creates a new GetDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest} GetDataAgentRequest instance + */ + GetDataAgentRequest.create = function create(properties) { + return new GetDataAgentRequest(properties); + }; + + /** + * Encodes the specified GetDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest} message GetDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAgentRequest.encode = function encode(message, writer) { + 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 GetDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest} message GetDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest} GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest} GetDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataAgentRequest.verify = function verify(message) { + if (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 GetDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest} GetDataAgentRequest + */ + GetDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest} message GetDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataAgentRequest.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 GetDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest"; + }; + + return GetDataAgentRequest; + })(); + + v1beta.CreateDataAgentRequest = (function() { + + /** + * Properties of a CreateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ICreateDataAgentRequest + * @property {string|null} [parent] CreateDataAgentRequest parent + * @property {string|null} [dataAgentId] CreateDataAgentRequest dataAgentId + * @property {google.cloud.geminidataanalytics.v1beta.IDataAgent|null} [dataAgent] CreateDataAgentRequest dataAgent + * @property {string|null} [requestId] CreateDataAgentRequest requestId + */ + + /** + * Constructs a new CreateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a CreateDataAgentRequest. + * @implements ICreateDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest=} [properties] Properties to set + */ + function CreateDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataAgentRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.parent = ""; + + /** + * CreateDataAgentRequest dataAgentId. + * @member {string} dataAgentId + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.dataAgentId = ""; + + /** + * CreateDataAgentRequest dataAgent. + * @member {google.cloud.geminidataanalytics.v1beta.IDataAgent|null|undefined} dataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.dataAgent = null; + + /** + * CreateDataAgentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @instance + */ + CreateDataAgentRequest.prototype.requestId = ""; + + /** + * Creates a new CreateDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest} CreateDataAgentRequest instance + */ + CreateDataAgentRequest.create = function create(properties) { + return new CreateDataAgentRequest(properties); + }; + + /** + * Encodes the specified CreateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest} message CreateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAgentRequest.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.dataAgentId != null && Object.hasOwnProperty.call(message, "dataAgentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataAgentId); + if (message.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) + $root.google.cloud.geminidataanalytics.v1beta.DataAgent.encode(message.dataAgent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest} message CreateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest} CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataAgentId = reader.string(); + break; + } + case 3: { + message.dataAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest} CreateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataAgentRequest.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.dataAgentId != null && message.hasOwnProperty("dataAgentId")) + if (!$util.isString(message.dataAgentId)) + return "dataAgentId: string expected"; + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.verify(message.dataAgent); + if (error) + return "dataAgent." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest} CreateDataAgentRequest + */ + CreateDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataAgentId != null) + message.dataAgentId = String(object.dataAgentId); + if (object.dataAgent != null) { + if (typeof object.dataAgent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest.dataAgent: object expected"); + message.dataAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.fromObject(object.dataAgent); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest} message CreateDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataAgentId = ""; + object.dataAgent = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataAgentId != null && message.hasOwnProperty("dataAgentId")) + object.dataAgentId = message.dataAgentId; + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + object.dataAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.toObject(message.dataAgent, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest"; + }; + + return CreateDataAgentRequest; + })(); + + v1beta.UpdateDataAgentRequest = (function() { + + /** + * Properties of an UpdateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IUpdateDataAgentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataAgentRequest updateMask + * @property {google.cloud.geminidataanalytics.v1beta.IDataAgent|null} [dataAgent] UpdateDataAgentRequest dataAgent + * @property {string|null} [requestId] UpdateDataAgentRequest requestId + */ + + /** + * Constructs a new UpdateDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an UpdateDataAgentRequest. + * @implements IUpdateDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest=} [properties] Properties to set + */ + function UpdateDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataAgentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @instance + */ + UpdateDataAgentRequest.prototype.updateMask = null; + + /** + * UpdateDataAgentRequest dataAgent. + * @member {google.cloud.geminidataanalytics.v1beta.IDataAgent|null|undefined} dataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @instance + */ + UpdateDataAgentRequest.prototype.dataAgent = null; + + /** + * UpdateDataAgentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @instance + */ + UpdateDataAgentRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest} UpdateDataAgentRequest instance + */ + UpdateDataAgentRequest.create = function create(properties) { + return new UpdateDataAgentRequest(properties); + }; + + /** + * Encodes the specified UpdateDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest} message UpdateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAgentRequest.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.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) + $root.google.cloud.geminidataanalytics.v1beta.DataAgent.encode(message.dataAgent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest} message UpdateDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest} UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dataAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest} UpdateDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataAgentRequest.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.dataAgent != null && message.hasOwnProperty("dataAgent")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.verify(message.dataAgent); + if (error) + return "dataAgent." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest} UpdateDataAgentRequest + */ + UpdateDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataAgent != null) { + if (typeof object.dataAgent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest.dataAgent: object expected"); + message.dataAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.fromObject(object.dataAgent); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest} message UpdateDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataAgent = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + object.dataAgent = $root.google.cloud.geminidataanalytics.v1beta.DataAgent.toObject(message.dataAgent, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest"; + }; + + return UpdateDataAgentRequest; + })(); + + v1beta.DeleteDataAgentRequest = (function() { + + /** + * Properties of a DeleteDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDeleteDataAgentRequest + * @property {string|null} [name] DeleteDataAgentRequest name + * @property {string|null} [requestId] DeleteDataAgentRequest requestId + */ + + /** + * Constructs a new DeleteDataAgentRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DeleteDataAgentRequest. + * @implements IDeleteDataAgentRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest=} [properties] Properties to set + */ + function DeleteDataAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataAgentRequest name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @instance + */ + DeleteDataAgentRequest.prototype.name = ""; + + /** + * DeleteDataAgentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @instance + */ + DeleteDataAgentRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteDataAgentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest} DeleteDataAgentRequest instance + */ + DeleteDataAgentRequest.create = function create(properties) { + return new DeleteDataAgentRequest(properties); + }; + + /** + * Encodes the specified DeleteDataAgentRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest} message DeleteDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAgentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteDataAgentRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest} message DeleteDataAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest} DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAgentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataAgentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest} DeleteDataAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAgentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataAgentRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataAgentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteDataAgentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest} DeleteDataAgentRequest + */ + DeleteDataAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteDataAgentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest} message DeleteDataAgentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataAgentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteDataAgentRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataAgentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataAgentRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest"; + }; + + return DeleteDataAgentRequest; + })(); + + v1beta.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.geminidataanalytics.v1beta + * @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.geminidataanalytics.v1beta + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.OperationMetadata) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {google.cloud.geminidataanalytics.v1beta.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.geminidataanalytics.v1beta.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1beta.DataChatService = (function() { + + /** + * Constructs a new DataChatService service. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataChatService + * @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 DataChatService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataChatService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataChatService; + + /** + * Creates new DataChatService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @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 {DataChatService} RPC service. Useful where requests and/or responses are streamed. + */ + DataChatService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|chat}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @typedef ChatCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.Message} [response] Message + */ + + /** + * Calls Chat. + * @function chat + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} request ChatRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataChatService.ChatCallback} callback Node-style callback called with the error, if any, and Message + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.chat = function chat(request, callback) { + return this.rpcCall(chat, $root.google.cloud.geminidataanalytics.v1beta.ChatRequest, $root.google.cloud.geminidataanalytics.v1beta.Message, request, callback); + }, "name", { value: "Chat" }); + + /** + * Calls Chat. + * @function chat + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} request ChatRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|createConversation}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @typedef CreateConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.Conversation} [response] Conversation + */ + + /** + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataChatService.CreateConversationCallback} callback Node-style callback called with the error, if any, and Conversation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.createConversation = function createConversation(request, callback) { + return this.rpcCall(createConversation, $root.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest, $root.google.cloud.geminidataanalytics.v1beta.Conversation, request, callback); + }, "name", { value: "CreateConversation" }); + + /** + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|getConversation}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @typedef GetConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.Conversation} [response] Conversation + */ + + /** + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IGetConversationRequest} request GetConversationRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataChatService.GetConversationCallback} callback Node-style callback called with the error, if any, and Conversation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.getConversation = function getConversation(request, callback) { + return this.rpcCall(getConversation, $root.google.cloud.geminidataanalytics.v1beta.GetConversationRequest, $root.google.cloud.geminidataanalytics.v1beta.Conversation, request, callback); + }, "name", { value: "GetConversation" }); + + /** + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IGetConversationRequest} request GetConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|listConversations}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @typedef ListConversationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.ListConversationsResponse} [response] ListConversationsResponse + */ + + /** + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsRequest} request ListConversationsRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataChatService.ListConversationsCallback} callback Node-style callback called with the error, if any, and ListConversationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.listConversations = function listConversations(request, callback) { + return this.rpcCall(listConversations, $root.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest, $root.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse, request, callback); + }, "name", { value: "ListConversations" }); + + /** + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListConversationsRequest} request ListConversationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.geminidataanalytics.v1beta.DataChatService|listMessages}. + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @typedef ListMessagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} [response] ListMessagesResponse + */ + + /** + * Calls ListMessages. + * @function listMessages + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} request ListMessagesRequest message or plain object + * @param {google.cloud.geminidataanalytics.v1beta.DataChatService.ListMessagesCallback} callback Node-style callback called with the error, if any, and ListMessagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataChatService.prototype.listMessages = function listMessages(request, callback) { + return this.rpcCall(listMessages, $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest, $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse, request, callback); + }, "name", { value: "ListMessages" }); + + /** + * Calls ListMessages. + * @function listMessages + * @memberof google.cloud.geminidataanalytics.v1beta.DataChatService + * @instance + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} request ListMessagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataChatService; + })(); + + v1beta.ListMessagesRequest = (function() { + + /** + * Properties of a ListMessagesRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListMessagesRequest + * @property {string|null} [parent] ListMessagesRequest parent + * @property {number|null} [pageSize] ListMessagesRequest pageSize + * @property {string|null} [pageToken] ListMessagesRequest pageToken + * @property {string|null} [filter] ListMessagesRequest filter + */ + + /** + * Constructs a new ListMessagesRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListMessagesRequest. + * @implements IListMessagesRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest=} [properties] Properties to set + */ + function ListMessagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMessagesRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.parent = ""; + + /** + * ListMessagesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.pageSize = 0; + + /** + * ListMessagesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.pageToken = ""; + + /** + * ListMessagesRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.filter = ""; + + /** + * Creates a new ListMessagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest instance + */ + ListMessagesRequest.create = function create(properties) { + return new ListMessagesRequest(properties); + }; + + /** + * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesRequest.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 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 ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.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 ListMessagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessagesRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessagesRequest.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 ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + */ + ListMessagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest(); + 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 ListMessagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} message ListMessagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessagesRequest.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 ListMessagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListMessagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessagesRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListMessagesRequest"; + }; + + return ListMessagesRequest; + })(); + + v1beta.ListMessagesResponse = (function() { + + /** + * Properties of a ListMessagesResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListMessagesResponse + * @property {Array.|null} [messages] ListMessagesResponse messages + * @property {string|null} [nextPageToken] ListMessagesResponse nextPageToken + */ + + /** + * Constructs a new ListMessagesResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListMessagesResponse. + * @implements IListMessagesResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse=} [properties] Properties to set + */ + function ListMessagesResponse(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMessagesResponse messages. + * @member {Array.} messages + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @instance + */ + ListMessagesResponse.prototype.messages = $util.emptyArray; + + /** + * ListMessagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @instance + */ + ListMessagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMessagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse instance + */ + ListMessagesResponse.create = function create(properties) { + return new ListMessagesResponse(properties); + }; + + /** + * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.encode(message.messages[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 ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.geminidataanalytics.v1beta.StorageMessage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessagesResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + */ + ListMessagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.messages: object expected"); + message.messages[i] = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.fromObject(object.messages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} message ListMessagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.toObject(message.messages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMessagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListMessagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessagesResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListMessagesResponse"; + }; + + return ListMessagesResponse; + })(); + + v1beta.StorageMessage = (function() { + + /** + * Properties of a StorageMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IStorageMessage + * @property {string|null} [messageId] StorageMessage messageId + * @property {google.cloud.geminidataanalytics.v1beta.IMessage|null} [message] StorageMessage message + */ + + /** + * Constructs a new StorageMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a StorageMessage. + * @implements IStorageMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage=} [properties] Properties to set + */ + function StorageMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageMessage messageId. + * @member {string} messageId + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @instance + */ + StorageMessage.prototype.messageId = ""; + + /** + * StorageMessage message. + * @member {google.cloud.geminidataanalytics.v1beta.IMessage|null|undefined} message + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @instance + */ + StorageMessage.prototype.message = null; + + /** + * Creates a new StorageMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage instance + */ + StorageMessage.create = function create(properties) { + return new StorageMessage(properties); + }; + + /** + * Encodes the specified StorageMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage} message StorageMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageId); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.geminidataanalytics.v1beta.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage} message StorageMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.StorageMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageId = reader.string(); + break; + } + case 2: { + message.message = $root.google.cloud.geminidataanalytics.v1beta.Message.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (!$util.isString(message.messageId)) + return "messageId: string expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Message.verify(message.message); + if (error) + return "message." + error; + } + return null; + }; + + /** + * Creates a StorageMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage + */ + StorageMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.StorageMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.StorageMessage(); + if (object.messageId != null) + message.messageId = String(object.messageId); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.StorageMessage.message: object expected"); + message.message = $root.google.cloud.geminidataanalytics.v1beta.Message.fromObject(object.message); + } + return message; + }; + + /** + * Creates a plain object from a StorageMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.StorageMessage} message StorageMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.messageId = ""; + object.message = null; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + object.messageId = message.messageId; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.google.cloud.geminidataanalytics.v1beta.Message.toObject(message.message, options); + return object; + }; + + /** + * Converts this StorageMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @instance + * @returns {Object.} JSON object + */ + StorageMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.StorageMessage"; + }; + + return StorageMessage; + })(); + + v1beta.ChatRequest = (function() { + + /** + * Properties of a ChatRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IChatRequest + * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [inlineContext] ChatRequest inlineContext + * @property {google.cloud.geminidataanalytics.v1beta.IConversationReference|null} [conversationReference] ChatRequest conversationReference + * @property {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null} [dataAgentContext] ChatRequest dataAgentContext + * @property {string|null} [project] ChatRequest project + * @property {string|null} [parent] ChatRequest parent + * @property {Array.|null} [messages] ChatRequest messages + */ + + /** + * Constructs a new ChatRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ChatRequest. + * @implements IChatRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest=} [properties] Properties to set + */ + function ChatRequest(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChatRequest inlineContext. + * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} inlineContext + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.inlineContext = null; + + /** + * ChatRequest conversationReference. + * @member {google.cloud.geminidataanalytics.v1beta.IConversationReference|null|undefined} conversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.conversationReference = null; + + /** + * ChatRequest dataAgentContext. + * @member {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null|undefined} dataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.dataAgentContext = null; + + /** + * ChatRequest project. + * @member {string} project + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.project = ""; + + /** + * ChatRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.parent = ""; + + /** + * ChatRequest messages. + * @member {Array.} messages + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.messages = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChatRequest contextProvider. + * @member {"inlineContext"|"conversationReference"|"dataAgentContext"|undefined} contextProvider + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + Object.defineProperty(ChatRequest.prototype, "contextProvider", { + get: $util.oneOfGetter($oneOfFields = ["inlineContext", "conversationReference", "dataAgentContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChatRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest instance + */ + ChatRequest.create = function create(properties) { + return new ChatRequest(properties); + }; + + /** + * Encodes the specified ChatRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} message ChatRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Message.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); + if (message.inlineContext != null && Object.hasOwnProperty.call(message, "inlineContext")) + $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.inlineContext, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.conversationReference != null && Object.hasOwnProperty.call(message, "conversationReference")) + $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.encode(message.conversationReference, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.dataAgentContext != null && Object.hasOwnProperty.call(message, "dataAgentContext")) + $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChatRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} message ChatRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChatRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChatRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 101: { + message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); + break; + } + case 103: { + message.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.decode(reader, reader.uint32()); + break; + } + case 104: { + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.decode(reader, reader.uint32()); + break; + } + case 1: { + message.project = reader.string(); + break; + } + case 3: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.geminidataanalytics.v1beta.Message.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChatRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChatRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChatRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.inlineContext); + if (error) + return "inlineContext." + error; + } + } + if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { + if (properties.contextProvider === 1) + return "contextProvider: multiple values"; + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.verify(message.conversationReference); + if (error) + return "conversationReference." + error; + } + } + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + if (properties.contextProvider === 1) + return "contextProvider: multiple values"; + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify(message.dataAgentContext); + if (error) + return "dataAgentContext." + error; + } + } + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + return null; + }; + + /** + * Creates a ChatRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest + */ + ChatRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChatRequest) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChatRequest(); + if (object.inlineContext != null) { + if (typeof object.inlineContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.inlineContext: object expected"); + message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.inlineContext); + } + if (object.conversationReference != null) { + if (typeof object.conversationReference !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.conversationReference: object expected"); + message.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.fromObject(object.conversationReference); + } + if (object.dataAgentContext != null) { + if (typeof object.dataAgentContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.dataAgentContext: object expected"); + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.fromObject(object.dataAgentContext); + } + if (object.project != null) + message.project = String(object.project); + if (object.parent != null) + message.parent = String(object.parent); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.messages: object expected"); + message.messages[i] = $root.google.cloud.geminidataanalytics.v1beta.Message.fromObject(object.messages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChatRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChatRequest} message ChatRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChatRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) { + object.project = ""; + object.parent = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.geminidataanalytics.v1beta.Message.toObject(message.messages[j], options); + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { + object.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.inlineContext, options); + if (options.oneofs) + object.contextProvider = "inlineContext"; + } + if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { + object.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.toObject(message.conversationReference, options); + if (options.oneofs) + object.contextProvider = "conversationReference"; + } + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.toObject(message.dataAgentContext, options); + if (options.oneofs) + object.contextProvider = "dataAgentContext"; + } + return object; + }; + + /** + * Converts this ChatRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + * @returns {Object.} JSON object + */ + ChatRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChatRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChatRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChatRequest"; + }; + + return ChatRequest; + })(); + + v1beta.DataAgentContext = (function() { + + /** + * Properties of a DataAgentContext. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDataAgentContext + * @property {string|null} [dataAgent] DataAgentContext dataAgent + * @property {google.cloud.geminidataanalytics.v1beta.ICredentials|null} [credentials] DataAgentContext credentials + * @property {google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion|null} [contextVersion] DataAgentContext contextVersion + */ + + /** + * Constructs a new DataAgentContext. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataAgentContext. + * @implements IDataAgentContext + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext=} [properties] Properties to set + */ + function DataAgentContext(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataAgentContext dataAgent. + * @member {string} dataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @instance + */ + DataAgentContext.prototype.dataAgent = ""; + + /** + * DataAgentContext credentials. + * @member {google.cloud.geminidataanalytics.v1beta.ICredentials|null|undefined} credentials + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @instance + */ + DataAgentContext.prototype.credentials = null; + + /** + * DataAgentContext contextVersion. + * @member {google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion} contextVersion + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @instance + */ + DataAgentContext.prototype.contextVersion = 0; + + /** + * Creates a new DataAgentContext instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext instance + */ + DataAgentContext.create = function create(properties) { + return new DataAgentContext(properties); + }; + + /** + * Encodes the specified DataAgentContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext} message DataAgentContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgentContext.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataAgent); + if (message.credentials != null && Object.hasOwnProperty.call(message, "credentials")) + $root.google.cloud.geminidataanalytics.v1beta.Credentials.encode(message.credentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contextVersion != null && Object.hasOwnProperty.call(message, "contextVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextVersion); + return writer; + }; + + /** + * Encodes the specified DataAgentContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext} message DataAgentContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAgentContext.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgentContext.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataAgent = reader.string(); + break; + } + case 2: { + message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.decode(reader, reader.uint32()); + break; + } + case 3: { + message.contextVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAgentContext message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAgentContext.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAgentContext message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAgentContext.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + if (!$util.isString(message.dataAgent)) + return "dataAgent: string expected"; + if (message.credentials != null && message.hasOwnProperty("credentials")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Credentials.verify(message.credentials); + if (error) + return "credentials." + error; + } + if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) + switch (message.contextVersion) { + default: + return "contextVersion: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DataAgentContext message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext + */ + DataAgentContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext(); + if (object.dataAgent != null) + message.dataAgent = String(object.dataAgent); + if (object.credentials != null) { + if (typeof object.credentials !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgentContext.credentials: object expected"); + message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.fromObject(object.credentials); + } + switch (object.contextVersion) { + default: + if (typeof object.contextVersion === "number") { + message.contextVersion = object.contextVersion; + break; + } + break; + case "CONTEXT_VERSION_UNSPECIFIED": + case 0: + message.contextVersion = 0; + break; + case "STAGING": + case 1: + message.contextVersion = 1; + break; + case "PUBLISHED": + case 2: + message.contextVersion = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataAgentContext message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentContext} message DataAgentContext + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAgentContext.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataAgent = ""; + object.credentials = null; + object.contextVersion = options.enums === String ? "CONTEXT_VERSION_UNSPECIFIED" : 0; + } + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + object.dataAgent = message.dataAgent; + if (message.credentials != null && message.hasOwnProperty("credentials")) + object.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.toObject(message.credentials, options); + if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) + object.contextVersion = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion[message.contextVersion] === undefined ? message.contextVersion : $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion[message.contextVersion] : message.contextVersion; + return object; + }; + + /** + * Converts this DataAgentContext to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @instance + * @returns {Object.} JSON object + */ + DataAgentContext.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAgentContext + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAgentContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataAgentContext"; + }; + + /** + * ContextVersion enum. + * @name google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion + * @enum {number} + * @property {number} CONTEXT_VERSION_UNSPECIFIED=0 CONTEXT_VERSION_UNSPECIFIED value + * @property {number} STAGING=1 STAGING value + * @property {number} PUBLISHED=2 PUBLISHED value + */ + DataAgentContext.ContextVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTEXT_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "STAGING"] = 1; + values[valuesById[2] = "PUBLISHED"] = 2; + return values; + })(); + + return DataAgentContext; + })(); + + v1beta.ConversationReference = (function() { + + /** + * Properties of a ConversationReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IConversationReference + * @property {string|null} [conversation] ConversationReference conversation + * @property {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null} [dataAgentContext] ConversationReference dataAgentContext + */ + + /** + * Constructs a new ConversationReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ConversationReference. + * @implements IConversationReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference=} [properties] Properties to set + */ + function ConversationReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationReference conversation. + * @member {string} conversation + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @instance + */ + ConversationReference.prototype.conversation = ""; + + /** + * ConversationReference dataAgentContext. + * @member {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null|undefined} dataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @instance + */ + ConversationReference.prototype.dataAgentContext = null; + + /** + * Creates a new ConversationReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference instance + */ + ConversationReference.create = function create(properties) { + return new ConversationReference(properties); + }; + + /** + * Encodes the specified ConversationReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference} message ConversationReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); + if (message.dataAgentContext != null && Object.hasOwnProperty.call(message, "dataAgentContext")) + $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference} message ConversationReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.conversation = reader.string(); + break; + } + case 3: { + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify(message.dataAgentContext); + if (error) + return "dataAgentContext." + error; + } + return null; + }; + + /** + * Creates a ConversationReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference + */ + ConversationReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ConversationReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationReference(); + if (object.conversation != null) + message.conversation = String(object.conversation); + if (object.dataAgentContext != null) { + if (typeof object.dataAgentContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ConversationReference.dataAgentContext: object expected"); + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.fromObject(object.dataAgentContext); + } + return message; + }; + + /** + * Creates a plain object from a ConversationReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ConversationReference} message ConversationReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversation = ""; + object.dataAgentContext = null; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) + object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.toObject(message.dataAgentContext, options); + return object; + }; + + /** + * Converts this ConversationReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @instance + * @returns {Object.} JSON object + */ + ConversationReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ConversationReference"; + }; + + return ConversationReference; + })(); + + v1beta.Message = (function() { + + /** + * Properties of a Message. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IMessage + * @property {google.cloud.geminidataanalytics.v1beta.IUserMessage|null} [userMessage] Message userMessage + * @property {google.cloud.geminidataanalytics.v1beta.ISystemMessage|null} [systemMessage] Message systemMessage + * @property {google.protobuf.ITimestamp|null} [timestamp] Message timestamp + * @property {string|null} [messageId] Message messageId + */ + + /** + * Constructs a new Message. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Message. + * @implements IMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IMessage=} [properties] Properties to set + */ + function Message(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Message userMessage. + * @member {google.cloud.geminidataanalytics.v1beta.IUserMessage|null|undefined} userMessage + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Message.prototype.userMessage = null; + + /** + * Message systemMessage. + * @member {google.cloud.geminidataanalytics.v1beta.ISystemMessage|null|undefined} systemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Message.prototype.systemMessage = null; + + /** + * Message timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Message.prototype.timestamp = null; + + /** + * Message messageId. + * @member {string} messageId + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Message.prototype.messageId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Message kind. + * @member {"userMessage"|"systemMessage"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Object.defineProperty(Message.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["userMessage", "systemMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Message instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message instance + */ + Message.create = function create(properties) { + return new Message(properties); + }; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userMessage != null && Object.hasOwnProperty.call(message, "userMessage")) + $root.google.cloud.geminidataanalytics.v1beta.UserMessage.encode(message.userMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.systemMessage != null && Object.hasOwnProperty.call(message, "systemMessage")) + $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.encode(message.systemMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.messageId); + return writer; + }; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Message message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Message(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.decode(reader, reader.uint32()); + break; + } + case 1: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.messageId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Message message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Message.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userMessage != null && message.hasOwnProperty("userMessage")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.verify(message.userMessage); + if (error) + return "userMessage." + error; + } + } + if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.verify(message.systemMessage); + if (error) + return "systemMessage." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (!$util.isString(message.messageId)) + return "messageId: string expected"; + return null; + }; + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message + */ + Message.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Message) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Message(); + if (object.userMessage != null) { + if (typeof object.userMessage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.userMessage: object expected"); + message.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.fromObject(object.userMessage); + } + if (object.systemMessage != null) { + if (typeof object.systemMessage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.systemMessage: object expected"); + message.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.fromObject(object.systemMessage); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.messageId != null) + message.messageId = String(object.messageId); + return message; + }; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Message} message Message + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Message.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timestamp = null; + object.messageId = ""; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.userMessage != null && message.hasOwnProperty("userMessage")) { + object.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.toObject(message.userMessage, options); + if (options.oneofs) + object.kind = "userMessage"; + } + if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { + object.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.toObject(message.systemMessage, options); + if (options.oneofs) + object.kind = "systemMessage"; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + object.messageId = message.messageId; + return object; + }; + + /** + * Converts this Message to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + * @returns {Object.} JSON object + */ + Message.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Message + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Message"; + }; + + return Message; + })(); + + v1beta.UserMessage = (function() { + + /** + * Properties of a UserMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IUserMessage + * @property {string|null} [text] UserMessage text + */ + + /** + * Constructs a new UserMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a UserMessage. + * @implements IUserMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage=} [properties] Properties to set + */ + function UserMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserMessage text. + * @member {string|null|undefined} text + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @instance + */ + UserMessage.prototype.text = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UserMessage kind. + * @member {"text"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @instance + */ + Object.defineProperty(UserMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage instance + */ + UserMessage.create = function create(properties) { + return new UserMessage(properties); + }; + + /** + * Encodes the specified UserMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage} message UserMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified UserMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage} message UserMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.UserMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.kind = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + return null; + }; + + /** + * Creates a UserMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage + */ + UserMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.UserMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.UserMessage(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a UserMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.UserMessage} message UserMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.kind = "text"; + } + return object; + }; + + /** + * Converts this UserMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @instance + * @returns {Object.} JSON object + */ + UserMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.UserMessage"; + }; + + return UserMessage; + })(); + + v1beta.SystemMessage = (function() { + + /** + * Properties of a SystemMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ISystemMessage + * @property {google.cloud.geminidataanalytics.v1beta.ITextMessage|null} [text] SystemMessage text + * @property {google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null} [schema] SystemMessage schema + * @property {google.cloud.geminidataanalytics.v1beta.IDataMessage|null} [data] SystemMessage data + * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null} [analysis] SystemMessage analysis + * @property {google.cloud.geminidataanalytics.v1beta.IChartMessage|null} [chart] SystemMessage chart + * @property {google.cloud.geminidataanalytics.v1beta.IErrorMessage|null} [error] SystemMessage error + * @property {number|null} [groupId] SystemMessage groupId + */ + + /** + * Constructs a new SystemMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a SystemMessage. + * @implements ISystemMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage=} [properties] Properties to set + */ + function SystemMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemMessage text. + * @member {google.cloud.geminidataanalytics.v1beta.ITextMessage|null|undefined} text + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.text = null; + + /** + * SystemMessage schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.schema = null; + + /** + * SystemMessage data. + * @member {google.cloud.geminidataanalytics.v1beta.IDataMessage|null|undefined} data + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.data = null; + + /** + * SystemMessage analysis. + * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null|undefined} analysis + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.analysis = null; + + /** + * SystemMessage chart. + * @member {google.cloud.geminidataanalytics.v1beta.IChartMessage|null|undefined} chart + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.chart = null; + + /** + * SystemMessage error. + * @member {google.cloud.geminidataanalytics.v1beta.IErrorMessage|null|undefined} error + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.error = null; + + /** + * SystemMessage groupId. + * @member {number|null|undefined} groupId + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.groupId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SystemMessage kind. + * @member {"text"|"schema"|"data"|"analysis"|"chart"|"error"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + Object.defineProperty(SystemMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["text", "schema", "data", "analysis", "chart", "error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SystemMessage.prototype, "_groupId", { + get: $util.oneOfGetter($oneOfFields = ["groupId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SystemMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage instance + */ + SystemMessage.create = function create(properties) { + return new SystemMessage(properties); + }; + + /** + * Encodes the specified SystemMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage} message SystemMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.geminidataanalytics.v1beta.TextMessage.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.google.cloud.geminidataanalytics.v1beta.DataMessage.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.encode(message.analysis, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.chart != null && Object.hasOwnProperty.call(message, "chart")) + $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.encode(message.chart, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.encode(message.error, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.groupId); + return writer; + }; + + /** + * Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage} message SystemMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SystemMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.decode(reader, reader.uint32()); + break; + } + case 5: { + message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.decode(reader, reader.uint32()); + break; + } + case 6: { + message.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.decode(reader, reader.uint32()); + break; + } + case 12: { + message.groupId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SystemMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.verify(message.text); + if (error) + return "text." + error; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify(message.schema); + if (error) + return "schema." + error; + } + } + if (message.data != null && message.hasOwnProperty("data")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.verify(message.data); + if (error) + return "data." + error; + } + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify(message.analysis); + if (error) + return "analysis." + error; + } + } + if (message.chart != null && message.hasOwnProperty("chart")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.verify(message.chart); + if (error) + return "chart." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.groupId != null && message.hasOwnProperty("groupId")) { + properties._groupId = 1; + if (!$util.isInteger(message.groupId)) + return "groupId: integer expected"; + } + return null; + }; + + /** + * Creates a SystemMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage + */ + SystemMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SystemMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.SystemMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.text: object expected"); + message.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.fromObject(object.text); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.fromObject(object.schema); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.data: object expected"); + message.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.fromObject(object.data); + } + if (object.analysis != null) { + if (typeof object.analysis !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.analysis: object expected"); + message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.fromObject(object.analysis); + } + if (object.chart != null) { + if (typeof object.chart !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.chart: object expected"); + message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.fromObject(object.chart); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.error: object expected"); + message.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.fromObject(object.error); + } + if (object.groupId != null) + message.groupId = object.groupId | 0; + return message; + }; + + /** + * Creates a plain object from a SystemMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.SystemMessage} message SystemMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SystemMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.toObject(message.text, options); + if (options.oneofs) + object.kind = "text"; + } + if (message.schema != null && message.hasOwnProperty("schema")) { + object.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.toObject(message.schema, options); + if (options.oneofs) + object.kind = "schema"; + } + if (message.data != null && message.hasOwnProperty("data")) { + object.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.toObject(message.data, options); + if (options.oneofs) + object.kind = "data"; + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + object.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.toObject(message.analysis, options); + if (options.oneofs) + object.kind = "analysis"; + } + if (message.chart != null && message.hasOwnProperty("chart")) { + object.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.toObject(message.chart, options); + if (options.oneofs) + object.kind = "chart"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.toObject(message.error, options); + if (options.oneofs) + object.kind = "error"; + } + if (message.groupId != null && message.hasOwnProperty("groupId")) { + object.groupId = message.groupId; + if (options.oneofs) + object._groupId = "groupId"; + } + return object; + }; + + /** + * Converts this SystemMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + * @returns {Object.} JSON object + */ + SystemMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SystemMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SystemMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SystemMessage"; + }; + + return SystemMessage; + })(); + + v1beta.TextMessage = (function() { + + /** + * Properties of a TextMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ITextMessage + * @property {Array.|null} [parts] TextMessage parts + */ + + /** + * Constructs a new TextMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a TextMessage. + * @implements ITextMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage=} [properties] Properties to set + */ + function TextMessage(properties) { + this.parts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextMessage parts. + * @member {Array.} parts + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @instance + */ + TextMessage.prototype.parts = $util.emptyArray; + + /** + * Creates a new TextMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage instance + */ + TextMessage.create = function create(properties) { + return new TextMessage(properties); + }; + + /** + * Encodes the specified TextMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage} message TextMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parts[i]); + return writer; + }; + + /** + * Encodes the specified TextMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage} message TextMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.TextMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) + if (!$util.isString(message.parts[i])) + return "parts: string[] expected"; + } + return null; + }; + + /** + * Creates a TextMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage + */ + TextMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.TextMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.TextMessage(); + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.TextMessage.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) + message.parts[i] = String(object.parts[i]); + } + return message; + }; + + /** + * Creates a plain object from a TextMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.TextMessage} message TextMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parts = []; + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = message.parts[j]; + } + return object; + }; + + /** + * Converts this TextMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @instance + * @returns {Object.} JSON object + */ + TextMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TextMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.TextMessage"; + }; + + return TextMessage; + })(); + + v1beta.SchemaMessage = (function() { + + /** + * Properties of a SchemaMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ISchemaMessage + * @property {google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null} [query] SchemaMessage query + * @property {google.cloud.geminidataanalytics.v1beta.ISchemaResult|null} [result] SchemaMessage result + */ + + /** + * Constructs a new SchemaMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a SchemaMessage. + * @implements ISchemaMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage=} [properties] Properties to set + */ + function SchemaMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @instance + */ + SchemaMessage.prototype.query = null; + + /** + * SchemaMessage result. + * @member {google.cloud.geminidataanalytics.v1beta.ISchemaResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @instance + */ + SchemaMessage.prototype.result = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchemaMessage kind. + * @member {"query"|"result"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @instance + */ + Object.defineProperty(SchemaMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "result"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchemaMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage instance + */ + SchemaMessage.create = function create(properties) { + return new SchemaMessage(properties); + }; + + /** + * Encodes the specified SchemaMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage} message SchemaMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage} message SchemaMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.verify(message.result); + if (error) + return "result." + error; + } + } + return null; + }; + + /** + * Creates a SchemaMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage + */ + SchemaMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.fromObject(object.query); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a SchemaMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.SchemaMessage} message SchemaMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; + } + return object; + }; + + /** + * Converts this SchemaMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @instance + * @returns {Object.} JSON object + */ + SchemaMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaMessage"; + }; + + return SchemaMessage; + })(); + + v1beta.SchemaQuery = (function() { + + /** + * Properties of a SchemaQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ISchemaQuery + * @property {string|null} [question] SchemaQuery question + */ + + /** + * Constructs a new SchemaQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a SchemaQuery. + * @implements ISchemaQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery=} [properties] Properties to set + */ + function SchemaQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @instance + */ + SchemaQuery.prototype.question = ""; + + /** + * Creates a new SchemaQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery instance + */ + SchemaQuery.create = function create(properties) { + return new SchemaQuery(properties); + }; + + /** + * Encodes the specified SchemaQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery} message SchemaQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + return writer; + }; + + /** + * Encodes the specified SchemaQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery} message SchemaQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + return null; + }; + + /** + * Creates a SchemaQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery + */ + SchemaQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery(); + if (object.question != null) + message.question = String(object.question); + return message; + }; + + /** + * Creates a plain object from a SchemaQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.SchemaQuery} message SchemaQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.question = ""; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + return object; + }; + + /** + * Converts this SchemaQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @instance + * @returns {Object.} JSON object + */ + SchemaQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaQuery"; + }; + + return SchemaQuery; + })(); + + v1beta.SchemaResult = (function() { + + /** + * Properties of a SchemaResult. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ISchemaResult + * @property {Array.|null} [datasources] SchemaResult datasources + */ + + /** + * Constructs a new SchemaResult. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a SchemaResult. + * @implements ISchemaResult + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult=} [properties] Properties to set + */ + function SchemaResult(properties) { + this.datasources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaResult datasources. + * @member {Array.} datasources + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @instance + */ + SchemaResult.prototype.datasources = $util.emptyArray; + + /** + * Creates a new SchemaResult instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult instance + */ + SchemaResult.create = function create(properties) { + return new SchemaResult(properties); + }; + + /** + * Encodes the specified SchemaResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult} message SchemaResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasources != null && message.datasources.length) + for (var i = 0; i < message.datasources.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Datasource.encode(message.datasources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult} message SchemaResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.datasources && message.datasources.length)) + message.datasources = []; + message.datasources.push($root.google.cloud.geminidataanalytics.v1beta.Datasource.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaResult message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasources != null && message.hasOwnProperty("datasources")) { + if (!Array.isArray(message.datasources)) + return "datasources: array expected"; + for (var i = 0; i < message.datasources.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Datasource.verify(message.datasources[i]); + if (error) + return "datasources." + error; + } + } + return null; + }; + + /** + * Creates a SchemaResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult + */ + SchemaResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaResult) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaResult(); + if (object.datasources) { + if (!Array.isArray(object.datasources)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaResult.datasources: array expected"); + message.datasources = []; + for (var i = 0; i < object.datasources.length; ++i) { + if (typeof object.datasources[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaResult.datasources: object expected"); + message.datasources[i] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.fromObject(object.datasources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.SchemaResult} message SchemaResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datasources = []; + if (message.datasources && message.datasources.length) { + object.datasources = []; + for (var j = 0; j < message.datasources.length; ++j) + object.datasources[j] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.toObject(message.datasources[j], options); + } + return object; + }; + + /** + * Converts this SchemaResult to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @instance + * @returns {Object.} JSON object + */ + SchemaResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaResult + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaResult"; + }; + + return SchemaResult; + })(); + + v1beta.DataMessage = (function() { + + /** + * Properties of a DataMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDataMessage + * @property {google.cloud.geminidataanalytics.v1beta.IDataQuery|null} [query] DataMessage query + * @property {string|null} [generatedSql] DataMessage generatedSql + * @property {google.cloud.geminidataanalytics.v1beta.IDataResult|null} [result] DataMessage result + * @property {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null} [generatedLookerQuery] DataMessage generatedLookerQuery + * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null} [bigQueryJob] DataMessage bigQueryJob + */ + + /** + * Constructs a new DataMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataMessage. + * @implements IDataMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage=} [properties] Properties to set + */ + function DataMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.IDataQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.query = null; + + /** + * DataMessage generatedSql. + * @member {string|null|undefined} generatedSql + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.generatedSql = null; + + /** + * DataMessage result. + * @member {google.cloud.geminidataanalytics.v1beta.IDataResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.result = null; + + /** + * DataMessage generatedLookerQuery. + * @member {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null|undefined} generatedLookerQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.generatedLookerQuery = null; + + /** + * DataMessage bigQueryJob. + * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null|undefined} bigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.bigQueryJob = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataMessage kind. + * @member {"query"|"generatedSql"|"result"|"generatedLookerQuery"|"bigQueryJob"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + Object.defineProperty(DataMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "generatedSql", "result", "generatedLookerQuery", "bigQueryJob"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage instance + */ + DataMessage.create = function create(properties) { + return new DataMessage(properties); + }; + + /** + * Encodes the specified DataMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage} message DataMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.DataQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generatedSql != null && Object.hasOwnProperty.call(message, "generatedSql")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.generatedSql); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1beta.DataResult.encode(message.result, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.generatedLookerQuery != null && Object.hasOwnProperty.call(message, "generatedLookerQuery")) + $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.encode(message.generatedLookerQuery, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bigQueryJob != null && Object.hasOwnProperty.call(message, "bigQueryJob")) + $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.encode(message.bigQueryJob, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage} message DataMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.generatedSql = reader.string(); + break; + } + case 3: { + message.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.decode(reader, reader.uint32()); + break; + } + case 4: { + message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.decode(reader, reader.uint32()); + break; + } + case 5: { + message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.generatedSql)) + return "generatedSql: string expected"; + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataResult.verify(message.result); + if (error) + return "result." + error; + } + } + if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.verify(message.generatedLookerQuery); + if (error) + return "generatedLookerQuery." + error; + } + } + if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify(message.bigQueryJob); + if (error) + return "bigQueryJob." + error; + } + } + return null; + }; + + /** + * Creates a DataMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage + */ + DataMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.fromObject(object.query); + } + if (object.generatedSql != null) + message.generatedSql = String(object.generatedSql); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.fromObject(object.result); + } + if (object.generatedLookerQuery != null) { + if (typeof object.generatedLookerQuery !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.generatedLookerQuery: object expected"); + message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.fromObject(object.generatedLookerQuery); + } + if (object.bigQueryJob != null) { + if (typeof object.bigQueryJob !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.bigQueryJob: object expected"); + message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.fromObject(object.bigQueryJob); + } + return message; + }; + + /** + * Creates a plain object from a DataMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DataMessage} message DataMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { + object.generatedSql = message.generatedSql; + if (options.oneofs) + object.kind = "generatedSql"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; + } + if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { + object.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.toObject(message.generatedLookerQuery, options); + if (options.oneofs) + object.kind = "generatedLookerQuery"; + } + if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { + object.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.toObject(message.bigQueryJob, options); + if (options.oneofs) + object.kind = "bigQueryJob"; + } + return object; + }; + + /** + * Converts this DataMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + * @returns {Object.} JSON object + */ + DataMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataMessage"; + }; + + return DataMessage; + })(); + + v1beta.LookerQuery = (function() { + + /** + * Properties of a LookerQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface ILookerQuery + * @property {string|null} [model] LookerQuery model + * @property {string|null} [explore] LookerQuery explore + * @property {Array.|null} [fields] LookerQuery fields + * @property {Array.|null} [filters] LookerQuery filters + * @property {Array.|null} [sorts] LookerQuery sorts + * @property {string|null} [limit] LookerQuery limit + */ + + /** + * Constructs a new LookerQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a LookerQuery. + * @implements ILookerQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ILookerQuery=} [properties] Properties to set + */ + function LookerQuery(properties) { + this.fields = []; + this.filters = []; + this.sorts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookerQuery model. + * @member {string} model + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @instance + */ + LookerQuery.prototype.model = ""; + + /** + * LookerQuery explore. + * @member {string} explore + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @instance + */ + LookerQuery.prototype.explore = ""; + + /** + * LookerQuery fields. + * @member {Array.} fields + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @instance + */ + LookerQuery.prototype.fields = $util.emptyArray; + + /** + * LookerQuery filters. + * @member {Array.} filters + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @instance + */ + LookerQuery.prototype.filters = $util.emptyArray; + + /** + * LookerQuery sorts. + * @member {Array.} sorts + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @instance + */ + LookerQuery.prototype.sorts = $util.emptyArray; + + /** + * LookerQuery limit. + * @member {string|null|undefined} limit + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @instance + */ + LookerQuery.prototype.limit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LookerQuery.prototype, "_limit", { + get: $util.oneOfGetter($oneOfFields = ["limit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LookerQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery} LookerQuery instance + */ + LookerQuery.create = function create(properties) { + return new LookerQuery(properties); + }; + + /** + * Encodes the specified LookerQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerQuery} message LookerQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.explore != null && Object.hasOwnProperty.call(message, "explore")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explore); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fields[i]); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.encode(message.filters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sorts != null && message.sorts.length) + for (var i = 0; i < message.sorts.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sorts[i]); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.limit); + return writer; + }; + + /** + * Encodes the specified LookerQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ILookerQuery} message LookerQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookerQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookerQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery} LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.LookerQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.explore = reader.string(); + break; + } + case 3: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push(reader.string()); + break; + } + case 4: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.sorts && message.sorts.length)) + message.sorts = []; + message.sorts.push(reader.string()); + break; + } + case 6: { + message.limit = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookerQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery} LookerQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookerQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookerQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookerQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.explore != null && message.hasOwnProperty("explore")) + if (!$util.isString(message.explore)) + return "explore: string 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) + if (!$util.isString(message.fields[i])) + return "fields: string[] expected"; + } + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + if (message.sorts != null && message.hasOwnProperty("sorts")) { + if (!Array.isArray(message.sorts)) + return "sorts: array expected"; + for (var i = 0; i < message.sorts.length; ++i) + if (!$util.isString(message.sorts[i])) + return "sorts: string[] expected"; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + properties._limit = 1; + if (!$util.isString(message.limit)) + return "limit: string expected"; + } + return null; + }; + + /** + * Creates a LookerQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery} LookerQuery + */ + LookerQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.LookerQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.LookerQuery(); + if (object.model != null) + message.model = String(object.model); + if (object.explore != null) + message.explore = String(object.explore); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerQuery.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) + message.fields[i] = String(object.fields[i]); + } + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerQuery.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerQuery.filters: object expected"); + message.filters[i] = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.fromObject(object.filters[i]); + } + } + if (object.sorts) { + if (!Array.isArray(object.sorts)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.LookerQuery.sorts: array expected"); + message.sorts = []; + for (var i = 0; i < object.sorts.length; ++i) + message.sorts[i] = String(object.sorts[i]); + } + if (object.limit != null) + message.limit = String(object.limit); + return message; + }; + + /** + * Creates a plain object from a LookerQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.LookerQuery} message LookerQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookerQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.filters = []; + object.sorts = []; + } + if (options.defaults) { + object.model = ""; + object.explore = ""; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.explore != null && message.hasOwnProperty("explore")) + object.explore = message.explore; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = message.fields[j]; + } + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.toObject(message.filters[j], options); + } + if (message.sorts && message.sorts.length) { + object.sorts = []; + for (var j = 0; j < message.sorts.length; ++j) + object.sorts[j] = message.sorts[j]; + } + if (message.limit != null && message.hasOwnProperty("limit")) { + object.limit = message.limit; + if (options.oneofs) + object._limit = "limit"; + } + return object; + }; + + /** + * Converts this LookerQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @instance + * @returns {Object.} JSON object + */ + LookerQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookerQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookerQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.LookerQuery"; + }; + + LookerQuery.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @interface IFilter + * @property {string|null} [field] Filter field + * @property {string|null} [value] Filter value + */ + + /** + * Constructs a new Filter. + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter=} [properties] Properties to set + */ + function Filter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Filter field. + * @member {string} field + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @instance + */ + Filter.prototype.field = ""; + + /** + * Filter value. + * @member {string} value + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @instance + */ + Filter.prototype.value = ""; + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.LookerQuery.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter(); + if (object.field != null) + message.field = String(object.field); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.value = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter"; + }; + + return Filter; + })(); + + return LookerQuery; + })(); + + v1beta.DataQuery = (function() { + + /** + * Properties of a DataQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDataQuery + * @property {string|null} [question] DataQuery question + * @property {string|null} [name] DataQuery name + * @property {Array.|null} [datasources] DataQuery datasources + */ + + /** + * Constructs a new DataQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataQuery. + * @implements IDataQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery=} [properties] Properties to set + */ + function DataQuery(properties) { + this.datasources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + */ + DataQuery.prototype.question = ""; + + /** + * DataQuery name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + */ + DataQuery.prototype.name = ""; + + /** + * DataQuery datasources. + * @member {Array.} datasources + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + */ + DataQuery.prototype.datasources = $util.emptyArray; + + /** + * Creates a new DataQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery instance + */ + DataQuery.create = function create(properties) { + return new DataQuery(properties); + }; + + /** + * Encodes the specified DataQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery} message DataQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.datasources != null && message.datasources.length) + for (var i = 0; i < message.datasources.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Datasource.encode(message.datasources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DataQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery} message DataQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.datasources && message.datasources.length)) + message.datasources = []; + message.datasources.push($root.google.cloud.geminidataanalytics.v1beta.Datasource.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.datasources != null && message.hasOwnProperty("datasources")) { + if (!Array.isArray(message.datasources)) + return "datasources: array expected"; + for (var i = 0; i < message.datasources.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Datasource.verify(message.datasources[i]); + if (error) + return "datasources." + error; + } + } + return null; + }; + + /** + * Creates a DataQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery + */ + DataQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataQuery(); + if (object.question != null) + message.question = String(object.question); + if (object.name != null) + message.name = String(object.name); + if (object.datasources) { + if (!Array.isArray(object.datasources)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.datasources: array expected"); + message.datasources = []; + for (var i = 0; i < object.datasources.length; ++i) { + if (typeof object.datasources[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.datasources: object expected"); + message.datasources[i] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.fromObject(object.datasources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DataQuery} message DataQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datasources = []; + if (options.defaults) { + object.question = ""; + object.name = ""; + } + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.datasources && message.datasources.length) { + object.datasources = []; + for (var j = 0; j < message.datasources.length; ++j) + object.datasources[j] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.toObject(message.datasources[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DataQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + * @returns {Object.} JSON object + */ + DataQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataQuery"; + }; + + return DataQuery; + })(); + + v1beta.DataResult = (function() { + + /** + * Properties of a DataResult. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IDataResult + * @property {string|null} [name] DataResult name + * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] DataResult schema + * @property {Array.|null} [data] DataResult data + */ + + /** + * Constructs a new DataResult. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a DataResult. + * @implements IDataResult + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult=} [properties] Properties to set + */ + function DataResult(properties) { + this.data = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataResult name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @instance + */ + DataResult.prototype.name = ""; + + /** + * DataResult schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @instance + */ + DataResult.prototype.schema = null; + + /** + * DataResult data. + * @member {Array.} data + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @instance + */ + DataResult.prototype.data = $util.emptyArray; + + /** + * Creates a new DataResult instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult instance + */ + DataResult.create = function create(properties) { + return new DataResult(properties); + }; + + /** + * Encodes the specified DataResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult} message DataResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && message.data.length) + for (var i = 0; i < message.data.length; ++i) + $root.google.protobuf.Struct.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult} message DataResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.name = reader.string(); + break; + } + case 5: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataResult message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataResult.verify = function verify(message) { + if (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.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (var i = 0; i < message.data.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a DataResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult + */ + DataResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataResult) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataResult(); + if (object.name != null) + message.name = String(object.name); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); + } + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.data: array expected"); + message.data = []; + for (var i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.data: object expected"); + message.data[i] = $root.google.protobuf.Struct.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.DataResult} message DataResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (options.defaults) { + object.name = ""; + object.schema = null; + } + if (message.data && message.data.length) { + object.data = []; + for (var j = 0; j < message.data.length; ++j) + object.data[j] = $root.google.protobuf.Struct.toObject(message.data[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this DataResult to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @instance + * @returns {Object.} JSON object + */ + DataResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataResult + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataResult"; + }; + + return DataResult; + })(); + + v1beta.BigQueryJob = (function() { + + /** + * Properties of a BigQueryJob. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IBigQueryJob + * @property {string|null} [projectId] BigQueryJob projectId + * @property {string|null} [jobId] BigQueryJob jobId + * @property {string|null} [location] BigQueryJob location + * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null} [destinationTable] BigQueryJob destinationTable + * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] BigQueryJob schema + */ + + /** + * Constructs a new BigQueryJob. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a BigQueryJob. + * @implements IBigQueryJob + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob=} [properties] Properties to set + */ + function BigQueryJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryJob projectId. + * @member {string} projectId + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @instance + */ + BigQueryJob.prototype.projectId = ""; + + /** + * BigQueryJob jobId. + * @member {string} jobId + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @instance + */ + BigQueryJob.prototype.jobId = ""; + + /** + * BigQueryJob location. + * @member {string} location + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @instance + */ + BigQueryJob.prototype.location = ""; + + /** + * BigQueryJob destinationTable. + * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null|undefined} destinationTable + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @instance + */ + BigQueryJob.prototype.destinationTable = null; + + /** + * BigQueryJob schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @instance + */ + BigQueryJob.prototype.schema = null; + + /** + * Creates a new BigQueryJob instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob instance + */ + BigQueryJob.create = function create(properties) { + return new BigQueryJob(properties); + }; + + /** + * Encodes the specified BigQueryJob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob} message BigQueryJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.destinationTable != null && Object.hasOwnProperty.call(message, "destinationTable")) + $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.encode(message.destinationTable, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.location); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryJob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob} message BigQueryJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryJob.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 5: { + message.location = reader.string(); + break; + } + case 3: { + message.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.decode(reader, reader.uint32()); + break; + } + case 7: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryJob message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify(message.destinationTable); + if (error) + return "destinationTable." + error; + } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates a BigQueryJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob + */ + BigQueryJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.location != null) + message.location = String(object.location); + if (object.destinationTable != null) { + if (typeof object.destinationTable !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryJob.destinationTable: object expected"); + message.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.fromObject(object.destinationTable); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryJob.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.BigQueryJob} message BigQueryJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.jobId = ""; + object.destinationTable = null; + object.location = ""; + object.schema = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) + object.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.toObject(message.destinationTable, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this BigQueryJob to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @instance + * @returns {Object.} JSON object + */ + BigQueryJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryJob + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.BigQueryJob"; + }; + + return BigQueryJob; + })(); + + v1beta.AnalysisMessage = (function() { + + /** + * Properties of an AnalysisMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IAnalysisMessage + * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null} [query] AnalysisMessage query + * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null} [progressEvent] AnalysisMessage progressEvent + */ + + /** + * Constructs a new AnalysisMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an AnalysisMessage. + * @implements IAnalysisMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage=} [properties] Properties to set + */ + function AnalysisMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @instance + */ + AnalysisMessage.prototype.query = null; + + /** + * AnalysisMessage progressEvent. + * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null|undefined} progressEvent + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @instance + */ + AnalysisMessage.prototype.progressEvent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalysisMessage kind. + * @member {"query"|"progressEvent"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @instance + */ + Object.defineProperty(AnalysisMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "progressEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalysisMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage instance + */ + AnalysisMessage.create = function create(properties) { + return new AnalysisMessage(properties); + }; + + /** + * Encodes the specified AnalysisMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage} message AnalysisMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.progressEvent != null && Object.hasOwnProperty.call(message, "progressEvent")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.encode(message.progressEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalysisMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage} message AnalysisMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify(message.progressEvent); + if (error) + return "progressEvent." + error; + } + } + return null; + }; + + /** + * Creates an AnalysisMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage + */ + AnalysisMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.fromObject(object.query); + } + if (object.progressEvent != null) { + if (typeof object.progressEvent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisMessage.progressEvent: object expected"); + message.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.fromObject(object.progressEvent); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} message AnalysisMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { + object.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.toObject(message.progressEvent, options); + if (options.oneofs) + object.kind = "progressEvent"; + } + return object; + }; + + /** + * Converts this AnalysisMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @instance + * @returns {Object.} JSON object + */ + AnalysisMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisMessage"; + }; + + return AnalysisMessage; + })(); + + v1beta.AnalysisQuery = (function() { + + /** + * Properties of an AnalysisQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IAnalysisQuery + * @property {string|null} [question] AnalysisQuery question + * @property {Array.|null} [dataResultNames] AnalysisQuery dataResultNames + */ + + /** + * Constructs a new AnalysisQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an AnalysisQuery. + * @implements IAnalysisQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery=} [properties] Properties to set + */ + function AnalysisQuery(properties) { + this.dataResultNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @instance + */ + AnalysisQuery.prototype.question = ""; + + /** + * AnalysisQuery dataResultNames. + * @member {Array.} dataResultNames + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @instance + */ + AnalysisQuery.prototype.dataResultNames = $util.emptyArray; + + /** + * Creates a new AnalysisQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery instance + */ + AnalysisQuery.create = function create(properties) { + return new AnalysisQuery(properties); + }; + + /** + * Encodes the specified AnalysisQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery} message AnalysisQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.dataResultNames != null && message.dataResultNames.length) + for (var i = 0; i < message.dataResultNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultNames[i]); + return writer; + }; + + /** + * Encodes the specified AnalysisQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery} message AnalysisQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } + case 2: { + if (!(message.dataResultNames && message.dataResultNames.length)) + message.dataResultNames = []; + message.dataResultNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.dataResultNames != null && message.hasOwnProperty("dataResultNames")) { + if (!Array.isArray(message.dataResultNames)) + return "dataResultNames: array expected"; + for (var i = 0; i < message.dataResultNames.length; ++i) + if (!$util.isString(message.dataResultNames[i])) + return "dataResultNames: string[] expected"; + } + return null; + }; + + /** + * Creates an AnalysisQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery + */ + AnalysisQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery(); + if (object.question != null) + message.question = String(object.question); + if (object.dataResultNames) { + if (!Array.isArray(object.dataResultNames)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisQuery.dataResultNames: array expected"); + message.dataResultNames = []; + for (var i = 0; i < object.dataResultNames.length; ++i) + message.dataResultNames[i] = String(object.dataResultNames[i]); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} message AnalysisQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataResultNames = []; + if (options.defaults) + object.question = ""; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.dataResultNames && message.dataResultNames.length) { + object.dataResultNames = []; + for (var j = 0; j < message.dataResultNames.length; ++j) + object.dataResultNames[j] = message.dataResultNames[j]; + } + return object; + }; + + /** + * Converts this AnalysisQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @instance + * @returns {Object.} JSON object + */ + AnalysisQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisQuery"; + }; + + return AnalysisQuery; + })(); + + v1beta.AnalysisEvent = (function() { + + /** + * Properties of an AnalysisEvent. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IAnalysisEvent + * @property {string|null} [plannerReasoning] AnalysisEvent plannerReasoning + * @property {string|null} [coderInstruction] AnalysisEvent coderInstruction + * @property {string|null} [code] AnalysisEvent code + * @property {string|null} [executionOutput] AnalysisEvent executionOutput + * @property {string|null} [executionError] AnalysisEvent executionError + * @property {string|null} [resultVegaChartJson] AnalysisEvent resultVegaChartJson + * @property {string|null} [resultNaturalLanguage] AnalysisEvent resultNaturalLanguage + * @property {string|null} [resultCsvData] AnalysisEvent resultCsvData + * @property {string|null} [resultReferenceData] AnalysisEvent resultReferenceData + * @property {string|null} [error] AnalysisEvent error + */ + + /** + * Constructs a new AnalysisEvent. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an AnalysisEvent. + * @implements IAnalysisEvent + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent=} [properties] Properties to set + */ + function AnalysisEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisEvent plannerReasoning. + * @member {string|null|undefined} plannerReasoning + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.plannerReasoning = null; + + /** + * AnalysisEvent coderInstruction. + * @member {string|null|undefined} coderInstruction + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.coderInstruction = null; + + /** + * AnalysisEvent code. + * @member {string|null|undefined} code + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.code = null; + + /** + * AnalysisEvent executionOutput. + * @member {string|null|undefined} executionOutput + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.executionOutput = null; + + /** + * AnalysisEvent executionError. + * @member {string|null|undefined} executionError + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.executionError = null; + + /** + * AnalysisEvent resultVegaChartJson. + * @member {string|null|undefined} resultVegaChartJson + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultVegaChartJson = null; + + /** + * AnalysisEvent resultNaturalLanguage. + * @member {string|null|undefined} resultNaturalLanguage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultNaturalLanguage = null; + + /** + * AnalysisEvent resultCsvData. + * @member {string|null|undefined} resultCsvData + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultCsvData = null; + + /** + * AnalysisEvent resultReferenceData. + * @member {string|null|undefined} resultReferenceData + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultReferenceData = null; + + /** + * AnalysisEvent error. + * @member {string|null|undefined} error + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalysisEvent kind. + * @member {"plannerReasoning"|"coderInstruction"|"code"|"executionOutput"|"executionError"|"resultVegaChartJson"|"resultNaturalLanguage"|"resultCsvData"|"resultReferenceData"|"error"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + Object.defineProperty(AnalysisEvent.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["plannerReasoning", "coderInstruction", "code", "executionOutput", "executionError", "resultVegaChartJson", "resultNaturalLanguage", "resultCsvData", "resultReferenceData", "error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalysisEvent instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent instance + */ + AnalysisEvent.create = function create(properties) { + return new AnalysisEvent(properties); + }; + + /** + * Encodes the specified AnalysisEvent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent} message AnalysisEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.plannerReasoning != null && Object.hasOwnProperty.call(message, "plannerReasoning")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.plannerReasoning); + if (message.coderInstruction != null && Object.hasOwnProperty.call(message, "coderInstruction")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.coderInstruction); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + if (message.executionOutput != null && Object.hasOwnProperty.call(message, "executionOutput")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.executionOutput); + if (message.executionError != null && Object.hasOwnProperty.call(message, "executionError")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.executionError); + if (message.resultVegaChartJson != null && Object.hasOwnProperty.call(message, "resultVegaChartJson")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.resultVegaChartJson); + if (message.resultNaturalLanguage != null && Object.hasOwnProperty.call(message, "resultNaturalLanguage")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resultNaturalLanguage); + if (message.resultCsvData != null && Object.hasOwnProperty.call(message, "resultCsvData")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.resultCsvData); + if (message.resultReferenceData != null && Object.hasOwnProperty.call(message, "resultReferenceData")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.resultReferenceData); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.error); + return writer; + }; + + /** + * Encodes the specified AnalysisEvent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent} message AnalysisEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisEvent.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.plannerReasoning = reader.string(); + break; + } + case 3: { + message.coderInstruction = reader.string(); + break; + } + case 4: { + message.code = reader.string(); + break; + } + case 5: { + message.executionOutput = reader.string(); + break; + } + case 6: { + message.executionError = reader.string(); + break; + } + case 7: { + message.resultVegaChartJson = reader.string(); + break; + } + case 8: { + message.resultNaturalLanguage = reader.string(); + break; + } + case 9: { + message.resultCsvData = reader.string(); + break; + } + case 10: { + message.resultReferenceData = reader.string(); + break; + } + case 11: { + message.error = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisEvent message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { + properties.kind = 1; + if (!$util.isString(message.plannerReasoning)) + return "plannerReasoning: string expected"; + } + if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.coderInstruction)) + return "coderInstruction: string expected"; + } + if (message.code != null && message.hasOwnProperty("code")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.code)) + return "code: string expected"; + } + if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.executionOutput)) + return "executionOutput: string expected"; + } + if (message.executionError != null && message.hasOwnProperty("executionError")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.executionError)) + return "executionError: string expected"; + } + if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultVegaChartJson)) + return "resultVegaChartJson: string expected"; + } + if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultNaturalLanguage)) + return "resultNaturalLanguage: string expected"; + } + if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultCsvData)) + return "resultCsvData: string expected"; + } + if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultReferenceData)) + return "resultReferenceData: string expected"; + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.error)) + return "error: string expected"; + } + return null; + }; + + /** + * Creates an AnalysisEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent + */ + AnalysisEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent(); + if (object.plannerReasoning != null) + message.plannerReasoning = String(object.plannerReasoning); + if (object.coderInstruction != null) + message.coderInstruction = String(object.coderInstruction); + if (object.code != null) + message.code = String(object.code); + if (object.executionOutput != null) + message.executionOutput = String(object.executionOutput); + if (object.executionError != null) + message.executionError = String(object.executionError); + if (object.resultVegaChartJson != null) + message.resultVegaChartJson = String(object.resultVegaChartJson); + if (object.resultNaturalLanguage != null) + message.resultNaturalLanguage = String(object.resultNaturalLanguage); + if (object.resultCsvData != null) + message.resultCsvData = String(object.resultCsvData); + if (object.resultReferenceData != null) + message.resultReferenceData = String(object.resultReferenceData); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from an AnalysisEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} message AnalysisEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { + object.plannerReasoning = message.plannerReasoning; + if (options.oneofs) + object.kind = "plannerReasoning"; + } + if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { + object.coderInstruction = message.coderInstruction; + if (options.oneofs) + object.kind = "coderInstruction"; + } + if (message.code != null && message.hasOwnProperty("code")) { + object.code = message.code; + if (options.oneofs) + object.kind = "code"; + } + if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { + object.executionOutput = message.executionOutput; + if (options.oneofs) + object.kind = "executionOutput"; + } + if (message.executionError != null && message.hasOwnProperty("executionError")) { + object.executionError = message.executionError; + if (options.oneofs) + object.kind = "executionError"; + } + if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { + object.resultVegaChartJson = message.resultVegaChartJson; + if (options.oneofs) + object.kind = "resultVegaChartJson"; + } + if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { + object.resultNaturalLanguage = message.resultNaturalLanguage; + if (options.oneofs) + object.kind = "resultNaturalLanguage"; + } + if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { + object.resultCsvData = message.resultCsvData; + if (options.oneofs) + object.kind = "resultCsvData"; + } + if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { + object.resultReferenceData = message.resultReferenceData; + if (options.oneofs) + object.kind = "resultReferenceData"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = message.error; + if (options.oneofs) + object.kind = "error"; + } + return object; + }; + + /** + * Converts this AnalysisEvent to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + * @returns {Object.} JSON object + */ + AnalysisEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisEvent + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisEvent"; + }; + + return AnalysisEvent; + })(); + + v1beta.ChartMessage = (function() { + + /** + * Properties of a ChartMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IChartMessage + * @property {google.cloud.geminidataanalytics.v1beta.IChartQuery|null} [query] ChartMessage query + * @property {google.cloud.geminidataanalytics.v1beta.IChartResult|null} [result] ChartMessage result + */ + + /** + * Constructs a new ChartMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ChartMessage. + * @implements IChartMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage=} [properties] Properties to set + */ + function ChartMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.IChartQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @instance + */ + ChartMessage.prototype.query = null; + + /** + * ChartMessage result. + * @member {google.cloud.geminidataanalytics.v1beta.IChartResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @instance + */ + ChartMessage.prototype.result = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChartMessage kind. + * @member {"query"|"result"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @instance + */ + Object.defineProperty(ChartMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "result"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChartMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage instance + */ + ChartMessage.create = function create(properties) { + return new ChartMessage(properties); + }; + + /** + * Encodes the specified ChartMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage} message ChartMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1beta.ChartResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChartMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage} message ChartMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.verify(message.result); + if (error) + return "result." + error; + } + } + return null; + }; + + /** + * Creates a ChartMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage + */ + ChartMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.fromObject(object.query); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a ChartMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartMessage} message ChartMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; + } + return object; + }; + + /** + * Converts this ChartMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @instance + * @returns {Object.} JSON object + */ + ChartMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartMessage"; + }; + + return ChartMessage; + })(); + + v1beta.ChartQuery = (function() { + + /** + * Properties of a ChartQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IChartQuery + * @property {string|null} [instructions] ChartQuery instructions + * @property {string|null} [dataResultName] ChartQuery dataResultName + */ + + /** + * Constructs a new ChartQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ChartQuery. + * @implements IChartQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery=} [properties] Properties to set + */ + function ChartQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartQuery instructions. + * @member {string} instructions + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @instance + */ + ChartQuery.prototype.instructions = ""; + + /** + * ChartQuery dataResultName. + * @member {string} dataResultName + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @instance + */ + ChartQuery.prototype.dataResultName = ""; + + /** + * Creates a new ChartQuery instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery instance + */ + ChartQuery.create = function create(properties) { + return new ChartQuery(properties); + }; + + /** + * Encodes the specified ChartQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery} message ChartQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instructions); + if (message.dataResultName != null && Object.hasOwnProperty.call(message, "dataResultName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultName); + return writer; + }; + + /** + * Encodes the specified ChartQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery} message ChartQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartQuery message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartQuery.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.instructions = reader.string(); + break; + } + case 2: { + message.dataResultName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) + if (!$util.isString(message.dataResultName)) + return "dataResultName: string expected"; + return null; + }; + + /** + * Creates a ChartQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery + */ + ChartQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartQuery) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartQuery(); + if (object.instructions != null) + message.instructions = String(object.instructions); + if (object.dataResultName != null) + message.dataResultName = String(object.dataResultName); + return message; + }; + + /** + * Creates a plain object from a ChartQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartQuery} message ChartQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.instructions = ""; + object.dataResultName = ""; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) + object.dataResultName = message.dataResultName; + return object; + }; + + /** + * Converts this ChartQuery to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @instance + * @returns {Object.} JSON object + */ + ChartQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartQuery + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartQuery"; + }; + + return ChartQuery; + })(); + + v1beta.ChartResult = (function() { + + /** + * Properties of a ChartResult. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IChartResult + * @property {google.protobuf.IStruct|null} [vegaConfig] ChartResult vegaConfig + * @property {google.cloud.geminidataanalytics.v1beta.IBlob|null} [image] ChartResult image + */ + + /** + * Constructs a new ChartResult. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ChartResult. + * @implements IChartResult + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult=} [properties] Properties to set + */ + function ChartResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartResult vegaConfig. + * @member {google.protobuf.IStruct|null|undefined} vegaConfig + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @instance + */ + ChartResult.prototype.vegaConfig = null; + + /** + * ChartResult image. + * @member {google.cloud.geminidataanalytics.v1beta.IBlob|null|undefined} image + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @instance + */ + ChartResult.prototype.image = null; + + /** + * Creates a new ChartResult instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult instance + */ + ChartResult.create = function create(properties) { + return new ChartResult(properties); + }; + + /** + * Encodes the specified ChartResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult} message ChartResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vegaConfig != null && Object.hasOwnProperty.call(message, "vegaConfig")) + $root.google.protobuf.Struct.encode(message.vegaConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.geminidataanalytics.v1beta.Blob.encode(message.image, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChartResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult} message ChartResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.vegaConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartResult message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) { + var error = $root.google.protobuf.Struct.verify(message.vegaConfig); + if (error) + return "vegaConfig." + error; + } + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Blob.verify(message.image); + if (error) + return "image." + error; + } + return null; + }; + + /** + * Creates a ChartResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult + */ + ChartResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartResult) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartResult(); + if (object.vegaConfig != null) { + if (typeof object.vegaConfig !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartResult.vegaConfig: object expected"); + message.vegaConfig = $root.google.protobuf.Struct.fromObject(object.vegaConfig); + } + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartResult.image: object expected"); + message.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.fromObject(object.image); + } + return message; + }; + + /** + * Creates a plain object from a ChartResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ChartResult} message ChartResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vegaConfig = null; + object.image = null; + } + if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) + object.vegaConfig = $root.google.protobuf.Struct.toObject(message.vegaConfig, options); + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.toObject(message.image, options); + return object; + }; + + /** + * Converts this ChartResult to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @instance + * @returns {Object.} JSON object + */ + ChartResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChartResult + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartResult"; + }; + + return ChartResult; + })(); + + v1beta.ErrorMessage = (function() { + + /** + * Properties of an ErrorMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IErrorMessage + * @property {string|null} [text] ErrorMessage text + */ + + /** + * Constructs a new ErrorMessage. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an ErrorMessage. + * @implements IErrorMessage + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage=} [properties] Properties to set + */ + function ErrorMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorMessage text. + * @member {string} text + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @instance + */ + ErrorMessage.prototype.text = ""; + + /** + * Creates a new ErrorMessage instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage instance + */ + ErrorMessage.create = function create(properties) { + return new ErrorMessage(properties); + }; + + /** + * Encodes the specified ErrorMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage} message ErrorMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage} message ErrorMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorMessage message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates an ErrorMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage + */ + ErrorMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from an ErrorMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ErrorMessage} message ErrorMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this ErrorMessage to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @instance + * @returns {Object.} JSON object + */ + ErrorMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorMessage + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ErrorMessage"; + }; + + return ErrorMessage; + })(); + + v1beta.Blob = (function() { + + /** + * Properties of a Blob. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IBlob + * @property {string|null} [mimeType] Blob mimeType + * @property {Uint8Array|null} [data] Blob data + */ + + /** + * Constructs a new Blob. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Blob. + * @implements IBlob + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IBlob=} [properties] Properties to set + */ + function Blob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Blob mimeType. + * @member {string} mimeType + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @instance + */ + Blob.prototype.mimeType = ""; + + /** + * Blob data. + * @member {Uint8Array} data + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @instance + */ + Blob.prototype.data = $util.newBuffer([]); + + /** + * Creates a new Blob instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBlob=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Blob} Blob instance + */ + Blob.create = function create(properties) { + return new Blob(properties); + }; + + /** + * Encodes the specified Blob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Blob.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBlob} message Blob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Blob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified Blob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Blob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IBlob} message Blob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Blob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Blob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Blob} Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Blob.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Blob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Blob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Blob} Blob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Blob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Blob message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Blob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a Blob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Blob} Blob + */ + Blob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Blob) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Blob(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a Blob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Blob} message Blob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Blob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this Blob to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @instance + * @returns {Object.} JSON object + */ + Blob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Blob + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Blob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Blob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Blob"; + }; + + return Blob; + })(); + + return v1beta; + })(); + + return geminidataanalytics; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + + return ListValue; + })(); + + return protobuf; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; + + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; + + return GetIamPolicyRequest; + })(); + + v1.TestIamPermissionsRequest = (function() { + + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ + + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; + + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(properties); + }; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; + + return TestIamPermissionsRequest; + })(); + + v1.TestIamPermissionsResponse = (function() { + + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ + + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; + + return TestIamPermissionsResponse; + })(); + + v1.GetPolicyOptions = (function() { + + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ + + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; + return object; + }; + + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; + + return GetPolicyOptions; + })(); + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + + return Binding; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.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); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.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"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; + })(); + + v1.AuditLogConfig = (function() { + + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ + + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; + + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; + + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) + return object; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + + return Expr; + })(); + + return type; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-geminidataanalytics/protos/protos.json b/packages/google-cloud-geminidataanalytics/protos/protos.json new file mode 100644 index 000000000000..9753146c5b01 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/protos/protos.json @@ -0,0 +1,6922 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "geminidataanalytics": { + "nested": { + "v1alpha": { + "options": { + "csharp_namespace": "Google.Cloud.GeminiDataAnalytics.V1Alpha", + "go_package": "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb", + "java_multiple_files": true, + "java_outer_classname": "DataChatServiceProto", + "java_package": "com.google.cloud.geminidataanalytics.v1alpha", + "php_namespace": "Google\\Cloud\\GeminiDataAnalytics\\V1alpha", + "ruby_package": "Google::Cloud::GeminiDataAnalytics::V1alpha" + }, + "nested": { + "Context": { + "fields": { + "systemInstruction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "datasourceReferences": { + "type": "DatasourceReferences", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "options": { + "type": "ConversationOptions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "exampleQueries": { + "rule": "repeated", + "type": "ExampleQuery", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "glossaryTerms": { + "rule": "repeated", + "type": "GlossaryTerm", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaRelationships": { + "rule": "repeated", + "type": "SchemaRelationship", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SchemaRelationship": { + "fields": { + "leftSchemaPaths": { + "type": "SchemaPaths", + "id": 1 + }, + "rightSchemaPaths": { + "type": "SchemaPaths", + "id": 2 + }, + "sources": { + "rule": "repeated", + "type": "Source", + "id": 3 + }, + "confidenceScore": { + "type": "float", + "id": 4 + } + }, + "nested": { + "SchemaPaths": { + "fields": { + "tableFqn": { + "type": "string", + "id": 1 + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "Source": { + "values": { + "SOURCE_UNSPECIFIED": 0, + "BIGQUERY_JOB_HISTORY": 1, + "LLM_SUGGESTED": 2, + "BIGQUERY_TABLE_CONSTRAINTS": 3 + } + } + } + } + } + }, + "ExampleQuery": { + "oneofs": { + "query": { + "oneof": [ + "sqlQuery" + ] + } + }, + "fields": { + "sqlQuery": { + "type": "string", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "naturalLanguageQuestion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GlossaryTerm": { + "fields": { + "displayName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "labels": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ConversationOptions": { + "fields": { + "chart": { + "type": "ChartOptions", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "analysis": { + "type": "AnalysisOptions", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ChartOptions": { + "fields": { + "image": { + "type": "ImageOptions", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ImageOptions": { + "oneofs": { + "kind": { + "oneof": [ + "noImage", + "svg" + ] + } + }, + "fields": { + "noImage": { + "type": "NoImage", + "id": 1 + }, + "svg": { + "type": "SvgOptions", + "id": 2 + } + }, + "nested": { + "NoImage": { + "fields": {} + }, + "SvgOptions": { + "fields": {} + } + } + } + } + }, + "AnalysisOptions": { + "fields": { + "python": { + "type": "Python", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Python": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DataFilterType": { + "values": { + "DATA_FILTER_TYPE_UNSPECIFIED": 0, + "ALWAYS_FILTER": 1 + } + }, + "DatasourceReferences": { + "oneofs": { + "references": { + "oneof": [ + "bq", + "studio", + "looker" + ] + } + }, + "fields": { + "bq": { + "type": "BigQueryTableReferences", + "id": 1 + }, + "studio": { + "type": "StudioDatasourceReferences", + "id": 2 + }, + "looker": { + "type": "LookerExploreReferences", + "id": 3 + } + } + }, + "BigQueryTableReferences": { + "fields": { + "tableReferences": { + "rule": "repeated", + "type": "BigQueryTableReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BigQueryTableReference": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "datasetId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tableId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schema": { + "type": "Schema", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "StudioDatasourceReferences": { + "fields": { + "studioReferences": { + "rule": "repeated", + "type": "StudioDatasourceReference", + "id": 2 + } + } + }, + "StudioDatasourceReference": { + "fields": { + "datasourceId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "LookerExploreReferences": { + "fields": { + "exploreReferences": { + "rule": "repeated", + "type": "LookerExploreReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "credentials": { + "type": "Credentials", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "LookerExploreReference": { + "oneofs": { + "instance": { + "oneof": [ + "lookerInstanceUri", + "privateLookerInstanceInfo" + ] + } + }, + "fields": { + "lookerInstanceUri": { + "type": "string", + "id": 9 + }, + "privateLookerInstanceInfo": { + "type": "PrivateLookerInstanceInfo", + "id": 10 + }, + "lookmlModel": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "explore": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schema": { + "type": "Schema", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivateLookerInstanceInfo": { + "fields": { + "lookerInstanceId": { + "type": "string", + "id": 1 + }, + "serviceDirectoryName": { + "type": "string", + "id": 2 + } + } + }, + "Datasource": { + "oneofs": { + "reference": { + "oneof": [ + "bigqueryTableReference", + "studioDatasourceId", + "lookerExploreReference" + ] + } + }, + "fields": { + "bigqueryTableReference": { + "type": "BigQueryTableReference", + "id": 1 + }, + "studioDatasourceId": { + "type": "string", + "id": 2 + }, + "lookerExploreReference": { + "type": "LookerExploreReference", + "id": 4 + }, + "schema": { + "type": "Schema", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Schema": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "synonyms": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filters": { + "rule": "repeated", + "type": "DataFilter", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Field": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mode": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "synonyms": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subfields": { + "rule": "repeated", + "type": "Field", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "category": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "valueFormat": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataFilter": { + "fields": { + "field": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "DataFilterType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Credentials": { + "oneofs": { + "kind": { + "oneof": [ + "oauth" + ] + } + }, + "fields": { + "oauth": { + "type": "OAuthCredentials", + "id": 1 + } + } + }, + "OAuthCredentials": { + "oneofs": { + "kind": { + "oneof": [ + "secret", + "token" + ] + } + }, + "fields": { + "secret": { + "type": "SecretBased", + "id": 2 + }, + "token": { + "type": "TokenBased", + "id": 3 + } + }, + "nested": { + "SecretBased": { + "fields": { + "clientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clientSecret": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TokenBased": { + "fields": { + "accessToken": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "Conversation": { + "options": { + "(google.api.resource).type": "geminidataanalytics.googleapis.com/Conversation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}", + "(google.api.resource).plural": "conversations", + "(google.api.resource).singular": "conversation" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "agents": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastUsedTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateConversationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "conversationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "conversation": { + "type": "Conversation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetConversationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/Conversation" + } + } + } + }, + "ListConversationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "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" + } + } + } + }, + "ListConversationsResponse": { + "fields": { + "conversations": { + "rule": "repeated", + "type": "Conversation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteConversationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/Conversation" + } + } + } + }, + "DataAgent": { + "options": { + "(google.api.resource).type": "geminidataanalytics.googleapis.com/DataAgent", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataAgents/{data_agent}", + "(google.api.resource).plural": "dataAgents", + "(google.api.resource).singular": "dataAgent" + }, + "oneofs": { + "type": { + "oneof": [ + "dataAnalyticsAgent" + ] + } + }, + "fields": { + "dataAnalyticsAgent": { + "type": "DataAnalyticsAgent", + "id": 101 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "purgeTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataAnalyticsAgent": { + "fields": { + "stagingContext": { + "type": "Context", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "publishedContext": { + "type": "Context", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "lastPublishedContext": { + "type": "Context", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataAgentService": { + "options": { + "(google.api.default_host)": "geminidataanalytics.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListDataAgents": { + "requestType": "ListDataAgentsRequest", + "responseType": "ListDataAgentsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/dataAgents", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/dataAgents" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListAccessibleDataAgents": { + "requestType": "ListAccessibleDataAgentsRequest", + "responseType": "ListAccessibleDataAgentsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/dataAgents:listAccessible", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/dataAgents:listAccessible" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataAgent": { + "requestType": "GetDataAgentRequest", + "responseType": "DataAgent", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/dataAgents/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/dataAgents/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDataAgent": { + "requestType": "CreateDataAgentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/dataAgents", + "(google.api.http).body": "data_agent", + "(google.api.method_signature)": "parent,data_agent,data_agent_id", + "(google.longrunning.operation_info).response_type": "DataAgent", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*}/dataAgents", + "body": "data_agent" + } + }, + { + "(google.api.method_signature)": "parent,data_agent,data_agent_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAgent", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDataAgent": { + "requestType": "UpdateDataAgentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1alpha/{data_agent.name=projects/*/locations/*/dataAgents/*}", + "(google.api.http).body": "data_agent", + "(google.api.method_signature)": "data_agent,update_mask", + "(google.longrunning.operation_info).response_type": "DataAgent", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{data_agent.name=projects/*/locations/*/dataAgents/*}", + "body": "data_agent" + } + }, + { + "(google.api.method_signature)": "data_agent,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAgent", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDataAgent": { + "requestType": "DeleteDataAgentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/dataAgents/*}", + "(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": "/v1alpha/{name=projects/*/locations/*/dataAgents/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1alpha/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1alpha/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + } + } + }, + "ListDataAgentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "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" + } + }, + "showDeleted": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataAgentsResponse": { + "fields": { + "dataAgents": { + "rule": "repeated", + "type": "DataAgent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + } + }, + "ListAccessibleDataAgentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "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" + } + }, + "showDeleted": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "creatorFilter": { + "type": "CreatorFilter", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CreatorFilter": { + "values": { + "CREATOR_FILTER_UNSPECIFIED": 0, + "NONE": 1, + "CREATOR_ONLY": 2, + "NOT_CREATOR_ONLY": 3 + } + } + } + }, + "ListAccessibleDataAgentsResponse": { + "fields": { + "dataAgents": { + "rule": "repeated", + "type": "DataAgent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + } + }, + "GetDataAgentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/DataAgent" + } + } + } + }, + "CreateDataAgentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "dataAgentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataAgent": { + "type": "DataAgent", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDataAgentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataAgent": { + "type": "DataAgent", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteDataAgentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "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" + } + } + } + }, + "DataChatService": { + "options": { + "(google.api.default_host)": "geminidataanalytics.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "Chat": { + "requestType": "ChatRequest", + "responseType": "Message", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}:chat", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*}:chat", + "body": "*" + } + } + ] + }, + "CreateConversation": { + "requestType": "CreateConversationRequest", + "responseType": "Conversation", + "options": { + "(google.api.http).post": "/v1alpha/{parent=projects/*/locations/*}/conversations", + "(google.api.http).body": "conversation", + "(google.api.method_signature)": "parent,conversation,conversation_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=projects/*/locations/*}/conversations", + "body": "conversation" + } + }, + { + "(google.api.method_signature)": "parent,conversation,conversation_id" + } + ] + }, + "DeleteConversation": { + "requestType": "DeleteConversationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=projects/*/locations/*/conversations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=projects/*/locations/*/conversations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetConversation": { + "requestType": "GetConversationRequest", + "responseType": "Conversation", + "options": { + "(google.api.http).get": "/v1alpha/{name=projects/*/locations/*/conversations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=projects/*/locations/*/conversations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConversations": { + "requestType": "ListConversationsRequest", + "responseType": "ListConversationsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*}/conversations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*}/conversations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListMessages": { + "requestType": "ListMessagesRequest", + "responseType": "ListMessagesResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=projects/*/locations/*/conversations/*}/messages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=projects/*/locations/*/conversations/*}/messages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListMessagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "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" + } + } + } + }, + "ListMessagesResponse": { + "fields": { + "messages": { + "rule": "repeated", + "type": "StorageMessage", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "StorageMessage": { + "fields": { + "messageId": { + "type": "string", + "id": 1 + }, + "message": { + "type": "Message", + "id": 2 + } + } + }, + "ChatRequest": { + "oneofs": { + "contextProvider": { + "oneof": [ + "inlineContext", + "conversationReference", + "dataAgentContext" + ] + } + }, + "fields": { + "inlineContext": { + "type": "Context", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "conversationReference": { + "type": "ConversationReference", + "id": 103, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataAgentContext": { + "type": "DataAgentContext", + "id": 104, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "project": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "parent": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "messages": { + "rule": "repeated", + "type": "Message", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DataAgentContext": { + "fields": { + "dataAgent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "credentials": { + "type": "Credentials", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "contextVersion": { + "type": "ContextVersion", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ContextVersion": { + "values": { + "CONTEXT_VERSION_UNSPECIFIED": 0, + "STAGING": 1, + "PUBLISHED": 2 + } + } + } + }, + "ConversationReference": { + "fields": { + "conversation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "dataAgentContext": { + "type": "DataAgentContext", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Message": { + "oneofs": { + "kind": { + "oneof": [ + "userMessage", + "systemMessage" + ] + } + }, + "fields": { + "userMessage": { + "type": "UserMessage", + "id": 2 + }, + "systemMessage": { + "type": "SystemMessage", + "id": 3 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "messageId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UserMessage": { + "oneofs": { + "kind": { + "oneof": [ + "text" + ] + } + }, + "fields": { + "text": { + "type": "string", + "id": 1 + } + } + }, + "SystemMessage": { + "oneofs": { + "kind": { + "oneof": [ + "text", + "schema", + "data", + "analysis", + "chart", + "error", + "exampleQueries" + ] + }, + "_groupId": { + "oneof": [ + "groupId" + ] + } + }, + "fields": { + "text": { + "type": "TextMessage", + "id": 1 + }, + "schema": { + "type": "SchemaMessage", + "id": 2 + }, + "data": { + "type": "DataMessage", + "id": 3 + }, + "analysis": { + "type": "AnalysisMessage", + "id": 4 + }, + "chart": { + "type": "ChartMessage", + "id": 5 + }, + "error": { + "type": "ErrorMessage", + "id": 6 + }, + "exampleQueries": { + "type": "ExampleQueries", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "groupId": { + "type": "int32", + "id": 12, + "options": { + "proto3_optional": true + } + } + } + }, + "TextMessage": { + "fields": { + "parts": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "textType": { + "type": "TextType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "TextType": { + "values": { + "TEXT_TYPE_UNSPECIFIED": 0, + "FINAL_RESPONSE": 1, + "THOUGHT": 2 + } + } + } + }, + "SchemaMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "result" + ] + } + }, + "fields": { + "query": { + "type": "SchemaQuery", + "id": 1 + }, + "result": { + "type": "SchemaResult", + "id": 2 + } + } + }, + "SchemaQuery": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SchemaResult": { + "fields": { + "datasources": { + "rule": "repeated", + "type": "Datasource", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "generatedSql", + "result", + "generatedLookerQuery", + "bigQueryJob" + ] + } + }, + "fields": { + "query": { + "type": "DataQuery", + "id": 1 + }, + "generatedSql": { + "type": "string", + "id": 2 + }, + "result": { + "type": "DataResult", + "id": 3 + }, + "generatedLookerQuery": { + "type": "LookerQuery", + "id": 4, + "options": { + "deprecated": true + } + }, + "bigQueryJob": { + "type": "BigQueryJob", + "id": 5 + } + } + }, + "LookerQuery": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "explore": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filters": { + "rule": "repeated", + "type": "Filter", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sorts": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "Filter": { + "fields": { + "field": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "DataQuery": { + "oneofs": { + "queryType": { + "oneof": [ + "looker" + ] + } + }, + "fields": { + "looker": { + "type": "LookerQuery", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "datasources": { + "rule": "repeated", + "type": "Datasource", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataResult": { + "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schema": { + "type": "Schema", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "data": { + "rule": "repeated", + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BigQueryJob": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "location": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "destinationTable": { + "type": "BigQueryTableReference", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schema": { + "type": "Schema", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AnalysisMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "progressEvent" + ] + } + }, + "fields": { + "query": { + "type": "AnalysisQuery", + "id": 1 + }, + "progressEvent": { + "type": "AnalysisEvent", + "id": 2 + } + } + }, + "AnalysisQuery": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataResultNames": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AnalysisEvent": { + "oneofs": { + "kind": { + "oneof": [ + "plannerReasoning", + "coderInstruction", + "code", + "executionOutput", + "executionError", + "resultVegaChartJson", + "resultNaturalLanguage", + "resultCsvData", + "resultReferenceData", + "error" + ] + } + }, + "fields": { + "plannerReasoning": { + "type": "string", + "id": 2 + }, + "coderInstruction": { + "type": "string", + "id": 3 + }, + "code": { + "type": "string", + "id": 4 + }, + "executionOutput": { + "type": "string", + "id": 5 + }, + "executionError": { + "type": "string", + "id": 6 + }, + "resultVegaChartJson": { + "type": "string", + "id": 7 + }, + "resultNaturalLanguage": { + "type": "string", + "id": 8 + }, + "resultCsvData": { + "type": "string", + "id": 9 + }, + "resultReferenceData": { + "type": "string", + "id": 10 + }, + "error": { + "type": "string", + "id": 11 + } + } + }, + "ChartMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "result" + ] + } + }, + "fields": { + "query": { + "type": "ChartQuery", + "id": 1 + }, + "result": { + "type": "ChartResult", + "id": 2 + } + } + }, + "ChartQuery": { + "fields": { + "instructions": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataResultName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ChartResult": { + "fields": { + "vegaConfig": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "image": { + "type": "Blob", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ErrorMessage": { + "fields": { + "text": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ExampleQueries": { + "fields": { + "exampleQueries": { + "rule": "repeated", + "type": "ExampleQuery", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Blob": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "data": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "v1beta": { + "options": { + "csharp_namespace": "Google.Cloud.GeminiDataAnalytics.V1Beta", + "go_package": "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb", + "java_multiple_files": true, + "java_outer_classname": "DataChatServiceProto", + "java_package": "com.google.cloud.geminidataanalytics.v1beta", + "php_namespace": "Google\\Cloud\\GeminiDataAnalytics\\V1beta", + "ruby_package": "Google::Cloud::GeminiDataAnalytics::V1beta" + }, + "nested": { + "Context": { + "fields": { + "systemInstruction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "datasourceReferences": { + "type": "DatasourceReferences", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "options": { + "type": "ConversationOptions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "exampleQueries": { + "rule": "repeated", + "type": "ExampleQuery", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExampleQuery": { + "oneofs": { + "query": { + "oneof": [ + "sqlQuery" + ] + } + }, + "fields": { + "sqlQuery": { + "type": "string", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "naturalLanguageQuestion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ConversationOptions": { + "fields": { + "chart": { + "type": "ChartOptions", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "analysis": { + "type": "AnalysisOptions", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ChartOptions": { + "fields": { + "image": { + "type": "ImageOptions", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ImageOptions": { + "oneofs": { + "kind": { + "oneof": [ + "noImage", + "svg" + ] + } + }, + "fields": { + "noImage": { + "type": "NoImage", + "id": 1 + }, + "svg": { + "type": "SvgOptions", + "id": 2 + } + }, + "nested": { + "NoImage": { + "fields": {} + }, + "SvgOptions": { + "fields": {} + } + } + } + } + }, + "AnalysisOptions": { + "fields": { + "python": { + "type": "Python", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Python": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DataFilterType": { + "values": { + "DATA_FILTER_TYPE_UNSPECIFIED": 0, + "ALWAYS_FILTER": 1 + } + }, + "DatasourceReferences": { + "oneofs": { + "references": { + "oneof": [ + "bq", + "studio", + "looker" + ] + } + }, + "fields": { + "bq": { + "type": "BigQueryTableReferences", + "id": 1 + }, + "studio": { + "type": "StudioDatasourceReferences", + "id": 2 + }, + "looker": { + "type": "LookerExploreReferences", + "id": 3 + } + } + }, + "BigQueryTableReferences": { + "fields": { + "tableReferences": { + "rule": "repeated", + "type": "BigQueryTableReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BigQueryTableReference": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "datasetId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tableId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schema": { + "type": "Schema", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "StudioDatasourceReferences": { + "fields": { + "studioReferences": { + "rule": "repeated", + "type": "StudioDatasourceReference", + "id": 2 + } + } + }, + "StudioDatasourceReference": { + "fields": { + "datasourceId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "LookerExploreReferences": { + "fields": { + "exploreReferences": { + "rule": "repeated", + "type": "LookerExploreReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "credentials": { + "type": "Credentials", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "LookerExploreReference": { + "oneofs": { + "instance": { + "oneof": [ + "lookerInstanceUri", + "privateLookerInstanceInfo" + ] + } + }, + "fields": { + "lookerInstanceUri": { + "type": "string", + "id": 9 + }, + "privateLookerInstanceInfo": { + "type": "PrivateLookerInstanceInfo", + "id": 10 + }, + "lookmlModel": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "explore": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schema": { + "type": "Schema", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivateLookerInstanceInfo": { + "fields": { + "lookerInstanceId": { + "type": "string", + "id": 1 + }, + "serviceDirectoryName": { + "type": "string", + "id": 2 + } + } + }, + "Datasource": { + "oneofs": { + "reference": { + "oneof": [ + "bigqueryTableReference", + "studioDatasourceId", + "lookerExploreReference" + ] + } + }, + "fields": { + "bigqueryTableReference": { + "type": "BigQueryTableReference", + "id": 1 + }, + "studioDatasourceId": { + "type": "string", + "id": 2 + }, + "lookerExploreReference": { + "type": "LookerExploreReference", + "id": 4 + }, + "schema": { + "type": "Schema", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Schema": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "synonyms": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filters": { + "rule": "repeated", + "type": "DataFilter", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Field": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mode": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "synonyms": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subfields": { + "rule": "repeated", + "type": "Field", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "category": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "valueFormat": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataFilter": { + "fields": { + "field": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "DataFilterType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Credentials": { + "oneofs": { + "kind": { + "oneof": [ + "oauth" + ] + } + }, + "fields": { + "oauth": { + "type": "OAuthCredentials", + "id": 1 + } + } + }, + "OAuthCredentials": { + "oneofs": { + "kind": { + "oneof": [ + "secret", + "token" + ] + } + }, + "fields": { + "secret": { + "type": "SecretBased", + "id": 2 + }, + "token": { + "type": "TokenBased", + "id": 3 + } + }, + "nested": { + "SecretBased": { + "fields": { + "clientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clientSecret": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TokenBased": { + "fields": { + "accessToken": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "Conversation": { + "options": { + "(google.api.resource).type": "geminidataanalytics.googleapis.com/Conversation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}", + "(google.api.resource).plural": "conversations", + "(google.api.resource).singular": "conversation" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "agents": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastUsedTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateConversationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "conversationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "conversation": { + "type": "Conversation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetConversationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/Conversation" + } + } + } + }, + "ListConversationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "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" + } + } + } + }, + "ListConversationsResponse": { + "fields": { + "conversations": { + "rule": "repeated", + "type": "Conversation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DataAgent": { + "options": { + "(google.api.resource).type": "geminidataanalytics.googleapis.com/DataAgent", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataAgents/{data_agent}", + "(google.api.resource).plural": "dataAgents", + "(google.api.resource).singular": "dataAgent" + }, + "oneofs": { + "type": { + "oneof": [ + "dataAnalyticsAgent" + ] + } + }, + "fields": { + "dataAnalyticsAgent": { + "type": "DataAnalyticsAgent", + "id": 101 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "purgeTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataAnalyticsAgent": { + "fields": { + "stagingContext": { + "type": "Context", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "publishedContext": { + "type": "Context", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "lastPublishedContext": { + "type": "Context", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataAgentService": { + "options": { + "(google.api.default_host)": "geminidataanalytics.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListDataAgents": { + "requestType": "ListDataAgentsRequest", + "responseType": "ListDataAgentsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/dataAgents", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/dataAgents" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListAccessibleDataAgents": { + "requestType": "ListAccessibleDataAgentsRequest", + "responseType": "ListAccessibleDataAgentsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/dataAgents:listAccessible", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/dataAgents:listAccessible" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataAgent": { + "requestType": "GetDataAgentRequest", + "responseType": "DataAgent", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/dataAgents/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/dataAgents/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDataAgent": { + "requestType": "CreateDataAgentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/dataAgents", + "(google.api.http).body": "data_agent", + "(google.api.method_signature)": "parent,data_agent,data_agent_id", + "(google.longrunning.operation_info).response_type": "DataAgent", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/dataAgents", + "body": "data_agent" + } + }, + { + "(google.api.method_signature)": "parent,data_agent,data_agent_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAgent", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDataAgent": { + "requestType": "UpdateDataAgentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{data_agent.name=projects/*/locations/*/dataAgents/*}", + "(google.api.http).body": "data_agent", + "(google.api.method_signature)": "data_agent,update_mask", + "(google.longrunning.operation_info).response_type": "DataAgent", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{data_agent.name=projects/*/locations/*/dataAgents/*}", + "body": "data_agent" + } + }, + { + "(google.api.method_signature)": "data_agent,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAgent", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDataAgent": { + "requestType": "DeleteDataAgentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/dataAgents/*}", + "(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": "/v1beta/{name=projects/*/locations/*/dataAgents/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1beta/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1beta/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + } + } + }, + "ListDataAgentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "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" + } + }, + "showDeleted": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataAgentsResponse": { + "fields": { + "dataAgents": { + "rule": "repeated", + "type": "DataAgent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + } + }, + "ListAccessibleDataAgentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "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" + } + }, + "showDeleted": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "creatorFilter": { + "type": "CreatorFilter", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CreatorFilter": { + "values": { + "CREATOR_FILTER_UNSPECIFIED": 0, + "NONE": 1, + "CREATOR_ONLY": 2, + "NOT_CREATOR_ONLY": 3 + } + } + } + }, + "ListAccessibleDataAgentsResponse": { + "fields": { + "dataAgents": { + "rule": "repeated", + "type": "DataAgent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + } + }, + "GetDataAgentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/DataAgent" + } + } + } + }, + "CreateDataAgentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "dataAgentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataAgent": { + "type": "DataAgent", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDataAgentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataAgent": { + "type": "DataAgent", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteDataAgentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "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" + } + } + } + }, + "DataChatService": { + "options": { + "(google.api.default_host)": "geminidataanalytics.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "Chat": { + "requestType": "ChatRequest", + "responseType": "Message", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}:chat", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}:chat", + "body": "*" + } + } + ] + }, + "CreateConversation": { + "requestType": "CreateConversationRequest", + "responseType": "Conversation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/conversations", + "(google.api.http).body": "conversation", + "(google.api.method_signature)": "parent,conversation,conversation_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/conversations", + "body": "conversation" + } + }, + { + "(google.api.method_signature)": "parent,conversation,conversation_id" + } + ] + }, + "GetConversation": { + "requestType": "GetConversationRequest", + "responseType": "Conversation", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/conversations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/conversations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConversations": { + "requestType": "ListConversationsRequest", + "responseType": "ListConversationsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/conversations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/conversations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListMessages": { + "requestType": "ListMessagesRequest", + "responseType": "ListMessagesResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/conversations/*}/messages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/conversations/*}/messages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListMessagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "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" + } + } + } + }, + "ListMessagesResponse": { + "fields": { + "messages": { + "rule": "repeated", + "type": "StorageMessage", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "StorageMessage": { + "fields": { + "messageId": { + "type": "string", + "id": 1 + }, + "message": { + "type": "Message", + "id": 2 + } + } + }, + "ChatRequest": { + "oneofs": { + "contextProvider": { + "oneof": [ + "inlineContext", + "conversationReference", + "dataAgentContext" + ] + } + }, + "fields": { + "inlineContext": { + "type": "Context", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "conversationReference": { + "type": "ConversationReference", + "id": 103, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataAgentContext": { + "type": "DataAgentContext", + "id": 104, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "project": { + "type": "string", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "parent": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "messages": { + "rule": "repeated", + "type": "Message", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DataAgentContext": { + "fields": { + "dataAgent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/DataAgent" + } + }, + "credentials": { + "type": "Credentials", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "contextVersion": { + "type": "ContextVersion", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ContextVersion": { + "values": { + "CONTEXT_VERSION_UNSPECIFIED": 0, + "STAGING": 1, + "PUBLISHED": 2 + } + } + } + }, + "ConversationReference": { + "fields": { + "conversation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "geminidataanalytics.googleapis.com/Conversation" + } + }, + "dataAgentContext": { + "type": "DataAgentContext", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Message": { + "oneofs": { + "kind": { + "oneof": [ + "userMessage", + "systemMessage" + ] + } + }, + "fields": { + "userMessage": { + "type": "UserMessage", + "id": 2 + }, + "systemMessage": { + "type": "SystemMessage", + "id": 3 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "messageId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UserMessage": { + "oneofs": { + "kind": { + "oneof": [ + "text" + ] + } + }, + "fields": { + "text": { + "type": "string", + "id": 1 + } + } + }, + "SystemMessage": { + "oneofs": { + "kind": { + "oneof": [ + "text", + "schema", + "data", + "analysis", + "chart", + "error" + ] + }, + "_groupId": { + "oneof": [ + "groupId" + ] + } + }, + "fields": { + "text": { + "type": "TextMessage", + "id": 1 + }, + "schema": { + "type": "SchemaMessage", + "id": 2 + }, + "data": { + "type": "DataMessage", + "id": 3 + }, + "analysis": { + "type": "AnalysisMessage", + "id": 4 + }, + "chart": { + "type": "ChartMessage", + "id": 5 + }, + "error": { + "type": "ErrorMessage", + "id": 6 + }, + "groupId": { + "type": "int32", + "id": 12, + "options": { + "proto3_optional": true + } + } + } + }, + "TextMessage": { + "fields": { + "parts": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SchemaMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "result" + ] + } + }, + "fields": { + "query": { + "type": "SchemaQuery", + "id": 1 + }, + "result": { + "type": "SchemaResult", + "id": 2 + } + } + }, + "SchemaQuery": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SchemaResult": { + "fields": { + "datasources": { + "rule": "repeated", + "type": "Datasource", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "generatedSql", + "result", + "generatedLookerQuery", + "bigQueryJob" + ] + } + }, + "fields": { + "query": { + "type": "DataQuery", + "id": 1 + }, + "generatedSql": { + "type": "string", + "id": 2 + }, + "result": { + "type": "DataResult", + "id": 3 + }, + "generatedLookerQuery": { + "type": "LookerQuery", + "id": 4 + }, + "bigQueryJob": { + "type": "BigQueryJob", + "id": 5 + } + } + }, + "LookerQuery": { + "oneofs": { + "_limit": { + "oneof": [ + "limit" + ] + } + }, + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "explore": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filters": { + "rule": "repeated", + "type": "Filter", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sorts": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limit": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "Filter": { + "fields": { + "field": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "DataQuery": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "datasources": { + "rule": "repeated", + "type": "Datasource", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataResult": { + "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schema": { + "type": "Schema", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "data": { + "rule": "repeated", + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BigQueryJob": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "location": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "destinationTable": { + "type": "BigQueryTableReference", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schema": { + "type": "Schema", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AnalysisMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "progressEvent" + ] + } + }, + "fields": { + "query": { + "type": "AnalysisQuery", + "id": 1 + }, + "progressEvent": { + "type": "AnalysisEvent", + "id": 2 + } + } + }, + "AnalysisQuery": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataResultNames": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AnalysisEvent": { + "oneofs": { + "kind": { + "oneof": [ + "plannerReasoning", + "coderInstruction", + "code", + "executionOutput", + "executionError", + "resultVegaChartJson", + "resultNaturalLanguage", + "resultCsvData", + "resultReferenceData", + "error" + ] + } + }, + "fields": { + "plannerReasoning": { + "type": "string", + "id": 2 + }, + "coderInstruction": { + "type": "string", + "id": 3 + }, + "code": { + "type": "string", + "id": 4 + }, + "executionOutput": { + "type": "string", + "id": 5 + }, + "executionError": { + "type": "string", + "id": 6 + }, + "resultVegaChartJson": { + "type": "string", + "id": 7 + }, + "resultNaturalLanguage": { + "type": "string", + "id": 8 + }, + "resultCsvData": { + "type": "string", + "id": 9 + }, + "resultReferenceData": { + "type": "string", + "id": 10 + }, + "error": { + "type": "string", + "id": 11 + } + } + }, + "ChartMessage": { + "oneofs": { + "kind": { + "oneof": [ + "query", + "result" + ] + } + }, + "fields": { + "query": { + "type": "ChartQuery", + "id": 1 + }, + "result": { + "type": "ChartResult", + "id": 2 + } + } + }, + "ChartQuery": { + "fields": { + "instructions": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataResultName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ChartResult": { + "fields": { + "vegaConfig": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "image": { + "type": "Blob", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ErrorMessage": { + "fields": { + "text": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Blob": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "data": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "policy": { + "type": "Policy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "options": { + "type": "GetPolicyOptions", + "id": 2 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.create_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.create_data_agent.js new file mode 100644 index 000000000000..5dd0c421e951 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.create_data_agent.js @@ -0,0 +1,87 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, dataAgent) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_CreateDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Optional. Id of the requesting object. Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + */ + // const dataAgentId = 'abc123' + /** + * Required. The resource being created. + */ + // const dataAgent = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callCreateDataAgent() { + // Construct request + const request = { + parent, + dataAgent, + }; + + // Run request + const [operation] = await geminidataanalyticsClient.createDataAgent(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDataAgent(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_CreateDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.delete_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.delete_data_agent.js new file mode 100644 index 000000000000..e22d14e9bc25 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.delete_data_agent.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_DeleteDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callDeleteDataAgent() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await geminidataanalyticsClient.deleteDataAgent(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDataAgent(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_DeleteDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_data_agent.js new file mode 100644 index 000000000000..79fdf5286b72 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_data_agent.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_GetDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + */ + // const name = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callGetDataAgent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await geminidataanalyticsClient.getDataAgent(request); + console.log(response); + } + + callGetDataAgent(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_GetDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_iam_policy.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_iam_policy.js new file mode 100644 index 000000000000..413e766a4f71 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await geminidataanalyticsClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_accessible_data_agents.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_accessible_data_agents.js new file mode 100644 index 000000000000..10fd370c4de0 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_accessible_data_agents.js @@ -0,0 +1,94 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_ListAccessibleDataAgents_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListAccessibleDataAgentsRequest. + */ + // const parent = 'abc123' + /** + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. See AIP-160 (https://google.aip.dev/160) for + * syntax. + */ + // const filter = 'abc123' + /** + * Optional. User specification for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + */ + // const showDeleted = true + /** + * Optional. Filter for the creator of the agent. + */ + // const creatorFilter = {} + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callListAccessibleDataAgents() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listAccessibleDataAgentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAccessibleDataAgents(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_ListAccessibleDataAgents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_data_agents.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_data_agents.js new file mode 100644 index 000000000000..7e4ff1311609 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.list_data_agents.js @@ -0,0 +1,90 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_ListDataAgents_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListDataAgentsRequest. + */ + // const parent = 'abc123' + /** + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. See AIP-160 (https://google.aip.dev/160) for + * syntax. + */ + // const filter = 'abc123' + /** + * Optional. User specification for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + */ + // const showDeleted = true + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callListDataAgents() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listDataAgentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataAgents(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_ListDataAgents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.set_iam_policy.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.set_iam_policy.js new file mode 100644 index 000000000000..e781e3985e3a --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await geminidataanalyticsClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.update_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.update_data_agent.js new file mode 100644 index 000000000000..0c53eadb9835 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_agent_service.update_data_agent.js @@ -0,0 +1,86 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(dataAgent) { + // [START geminidataanalytics_v1alpha_generated_DataAgentService_UpdateDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * DataAgent resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields with non-default values + * present in the request will be overwritten. If a wildcard mask is provided, + * all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The resource being updated. + */ + // const dataAgent = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callUpdateDataAgent() { + // Construct request + const request = { + dataAgent, + }; + + // Run request + const [operation] = await geminidataanalyticsClient.updateDataAgent(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataAgent(); + // [END geminidataanalytics_v1alpha_generated_DataAgentService_UpdateDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.chat.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.chat.js new file mode 100644 index 000000000000..6bffe9b5cb8b --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.chat.js @@ -0,0 +1,89 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, messages) { + // [START geminidataanalytics_v1alpha_generated_DataChatService_Chat_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Inline context for the chat request. Use this to chat + * statelessly (without managed conversation persistence and without an + * Agent) by passing all context inline. + */ + // const inlineContext = {} + /** + * Optional. Reference to a persisted conversation and agent context. + * Use this to chat with an Agent using managed conversation persistence. + */ + // const conversationReference = {} + /** + * Optional. Context for the chat request. Use this to chat with an Agent + * statelessly, without managed conversation persistence. + */ + // const dataAgentContext = {} + /** + * Optional. The Google Cloud project to be used for quota and billing. + */ + // const project = 'abc123' + /** + * Required. The parent value for chat request. + * Pattern: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. Content of current conversation. + */ + // const messages = [1,2,3,4] + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callChat() { + // Construct request + const request = { + parent, + messages, + }; + + // Run request + const stream = await geminidataanalyticsClient.chat(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callChat(); + // [END geminidataanalytics_v1alpha_generated_DataChatService_Chat_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.create_conversation.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.create_conversation.js new file mode 100644 index 000000000000..805f1f26ddc7 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.create_conversation.js @@ -0,0 +1,81 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, conversation) { + // [START geminidataanalytics_v1alpha_generated_DataChatService_CreateConversation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for CreateConversationRequest. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The conversation id of the conversation to create. + * Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + */ + // const conversationId = 'abc123' + /** + * Required. The conversation to create. + */ + // const conversation = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callCreateConversation() { + // Construct request + const request = { + parent, + conversation, + }; + + // Run request + const response = await geminidataanalyticsClient.createConversation(request); + console.log(response); + } + + callCreateConversation(); + // [END geminidataanalytics_v1alpha_generated_DataChatService_CreateConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.delete_conversation.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.delete_conversation.js new file mode 100644 index 000000000000..556595e8269d --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.delete_conversation.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START geminidataanalytics_v1alpha_generated_DataChatService_DeleteConversation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + */ + // const name = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callDeleteConversation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await geminidataanalyticsClient.deleteConversation(request); + console.log(response); + } + + callDeleteConversation(); + // [END geminidataanalytics_v1alpha_generated_DataChatService_DeleteConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.get_conversation.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.get_conversation.js new file mode 100644 index 000000000000..6b39baf9338f --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.get_conversation.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START geminidataanalytics_v1alpha_generated_DataChatService_GetConversation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + */ + // const name = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callGetConversation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await geminidataanalyticsClient.getConversation(request); + console.log(response); + } + + callGetConversation(); + // [END geminidataanalytics_v1alpha_generated_DataChatService_GetConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_conversations.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_conversations.js new file mode 100644 index 000000000000..57371f27c3af --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_conversations.js @@ -0,0 +1,81 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1alpha_generated_DataChatService_ListConversations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agents + * * labels + */ + // const filter = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callListConversations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listConversationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConversations(); + // [END geminidataanalytics_v1alpha_generated_DataChatService_ListConversations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_messages.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_messages.js new file mode 100644 index 000000000000..8afda79b1c44 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/data_chat_service.list_messages.js @@ -0,0 +1,83 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1alpha_generated_DataChatService_ListMessages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. See AIP-160 (https://google.aip.dev/160) for + * syntax. + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + */ + // const filter = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1alpha; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callListMessages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listMessagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMessages(); + // [END geminidataanalytics_v1alpha_generated_DataChatService_ListMessages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/snippet_metadata_google.cloud.geminidataanalytics.v1alpha.json b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/snippet_metadata_google.cloud.geminidataanalytics.v1alpha.json new file mode 100644 index 000000000000..e3f969a29438 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1alpha/snippet_metadata_google.cloud.geminidataanalytics.v1alpha.json @@ -0,0 +1,711 @@ +{ + "clientLibrary": { + "name": "nodejs-geminidataanalytics", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.geminidataanalytics.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_ListDataAgents_async", + "title": "DataAgentService listDataAgents Sample", + "origin": "API_DEFINITION", + "description": " Lists DataAgents in a given project and location.", + "canonical": true, + "file": "data_agent_service.list_data_agents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListDataAgents", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.ListDataAgentsResponse", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "ListDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListDataAgents", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_ListAccessibleDataAgents_async", + "title": "DataAgentService listAccessibleDataAgents Sample", + "origin": "API_DEFINITION", + "description": " Lists DataAgents that are accessible to the caller in a given project and location.", + "canonical": true, + "file": "data_agent_service.list_accessible_data_agents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAccessibleDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListAccessibleDataAgents", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + }, + { + "name": "creator_filter", + "type": ".google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsResponse", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "ListAccessibleDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.ListAccessibleDataAgents", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_GetDataAgent_async", + "title": "DataAgentService getDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single DataAgent.", + "canonical": true, + "file": "data_agent_service.get_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetDataAgent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.DataAgent", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "GetDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_CreateDataAgent_async", + "title": "DataAgentService createDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Creates a new DataAgent in a given project and location.", + "canonical": true, + "file": "data_agent_service.create_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.CreateDataAgent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_agent_id", + "type": "TYPE_STRING" + }, + { + "name": "data_agent", + "type": ".google.cloud.geminidataanalytics.v1alpha.DataAgent" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "CreateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.CreateDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_UpdateDataAgent_async", + "title": "DataAgentService updateDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single DataAgent.", + "canonical": true, + "file": "data_agent_service.update_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.UpdateDataAgent", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_agent", + "type": ".google.cloud.geminidataanalytics.v1alpha.DataAgent" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "UpdateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.UpdateDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_DeleteDataAgent_async", + "title": "DataAgentService deleteDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single DataAgent.", + "canonical": true, + "file": "data_agent_service.delete_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.DeleteDataAgent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "DeleteDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.DeleteDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_GetIamPolicy_async", + "title": "DataAgentService getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the IAM policy for DataAgent", + "canonical": true, + "file": "data_agent_service.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.GetIamPolicy", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataAgentService_SetIamPolicy_async", + "title": "DataAgentService setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the IAM policy for a DataAgent.", + "canonical": true, + "file": "data_agent_service.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentServiceClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService.SetIamPolicy", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataChatService_Chat_async", + "title": "DataAgentService chat Sample", + "origin": "API_DEFINITION", + "description": " Answers a data question by generating a stream of [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects.", + "canonical": true, + "file": "data_chat_service.chat.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "Chat", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.Chat", + "async": true, + "parameters": [ + { + "name": "inline_context", + "type": ".google.cloud.geminidataanalytics.v1alpha.Context" + }, + { + "name": "conversation_reference", + "type": ".google.cloud.geminidataanalytics.v1alpha.ConversationReference" + }, + { + "name": "data_agent_context", + "type": ".google.cloud.geminidataanalytics.v1alpha.DataAgentContext" + }, + { + "name": "project", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "messages", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.Message", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatServiceClient" + }, + "method": { + "shortName": "Chat", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.Chat", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataChatService_CreateConversation_async", + "title": "DataAgentService createConversation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new conversation to persist the conversation history. Each conversation will have multiple messages associated with it.", + "canonical": true, + "file": "data_chat_service.create_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConversation", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.CreateConversation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "conversation_id", + "type": "TYPE_STRING" + }, + { + "name": "conversation", + "type": ".google.cloud.geminidataanalytics.v1alpha.Conversation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.Conversation", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatServiceClient" + }, + "method": { + "shortName": "CreateConversation", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.CreateConversation", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataChatService_DeleteConversation_async", + "title": "DataAgentService deleteConversation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a conversation.", + "canonical": true, + "file": "data_chat_service.delete_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConversation", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.DeleteConversation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatServiceClient" + }, + "method": { + "shortName": "DeleteConversation", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.DeleteConversation", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataChatService_GetConversation_async", + "title": "DataAgentService getConversation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single conversation by using conversation id and parent.", + "canonical": true, + "file": "data_chat_service.get_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConversation", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.GetConversation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.Conversation", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatServiceClient" + }, + "method": { + "shortName": "GetConversation", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.GetConversation", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataChatService_ListConversations_async", + "title": "DataAgentService listConversations Sample", + "origin": "API_DEFINITION", + "description": " Lists all conversations for a given parent.", + "canonical": true, + "file": "data_chat_service.list_conversations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConversations", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.ListConversations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.ListConversationsResponse", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatServiceClient" + }, + "method": { + "shortName": "ListConversations", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.ListConversations", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1alpha_generated_DataChatService_ListMessages_async", + "title": "DataAgentService listMessages Sample", + "origin": "API_DEFINITION", + "description": " Lists all messages for a given conversation.", + "canonical": true, + "file": "data_chat_service.list_messages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMessages", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.ListMessages", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1alpha.ListMessagesResponse", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatServiceClient" + }, + "method": { + "shortName": "ListMessages", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService.ListMessages", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1alpha.DataChatService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.create_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.create_data_agent.js new file mode 100644 index 000000000000..cf12ce9132af --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.create_data_agent.js @@ -0,0 +1,87 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, dataAgent) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Optional. Id of the requesting object. Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + */ + // const dataAgentId = 'abc123' + /** + * Required. The resource being created. + */ + // const dataAgent = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callCreateDataAgent() { + // Construct request + const request = { + parent, + dataAgent, + }; + + // Run request + const [operation] = await geminidataanalyticsClient.createDataAgent(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDataAgent(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.delete_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.delete_data_agent.js new file mode 100644 index 000000000000..223ba0c6108c --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.delete_data_agent.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callDeleteDataAgent() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await geminidataanalyticsClient.deleteDataAgent(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDataAgent(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_data_agent.js new file mode 100644 index 000000000000..809e5b94f0e8 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_data_agent.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + */ + // const name = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callGetDataAgent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await geminidataanalyticsClient.getDataAgent(request); + console.log(response); + } + + callGetDataAgent(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_iam_policy.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_iam_policy.js new file mode 100644 index 000000000000..296471724539 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await geminidataanalyticsClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_accessible_data_agents.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_accessible_data_agents.js new file mode 100644 index 000000000000..76138dd66515 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_accessible_data_agents.js @@ -0,0 +1,94 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListAccessibleDataAgentsRequest. + */ + // const parent = 'abc123' + /** + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. See AIP-160 (https://google.aip.dev/160) for + * syntax. + */ + // const filter = 'abc123' + /** + * Optional. User specification for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + */ + // const showDeleted = true + /** + * Optional. Filter for the creator of the agent. + */ + // const creatorFilter = {} + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callListAccessibleDataAgents() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listAccessibleDataAgentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAccessibleDataAgents(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_data_agents.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_data_agents.js new file mode 100644 index 000000000000..1da88eabd1f4 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.list_data_agents.js @@ -0,0 +1,90 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListDataAgentsRequest. + */ + // const parent = 'abc123' + /** + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. See AIP-160 (https://google.aip.dev/160) for + * syntax. + */ + // const filter = 'abc123' + /** + * Optional. User specification for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + */ + // const showDeleted = true + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callListDataAgents() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listDataAgentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataAgents(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.set_iam_policy.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.set_iam_policy.js new file mode 100644 index 000000000000..e7a358690fcd --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await geminidataanalyticsClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.update_data_agent.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.update_data_agent.js new file mode 100644 index 000000000000..d7d3d43223c8 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.update_data_agent.js @@ -0,0 +1,86 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(dataAgent) { + // [START geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * DataAgent resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields with non-default values + * present in the request will be overwritten. If a wildcard mask is provided, + * all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The resource being updated. + */ + // const dataAgent = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataAgentServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataAgentServiceClient(); + + async function callUpdateDataAgent() { + // Construct request + const request = { + dataAgent, + }; + + // Run request + const [operation] = await geminidataanalyticsClient.updateDataAgent(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataAgent(); + // [END geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.chat.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.chat.js new file mode 100644 index 000000000000..34fc1f4813f2 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.chat.js @@ -0,0 +1,89 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, messages) { + // [START geminidataanalytics_v1beta_generated_DataChatService_Chat_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Inline context for the chat request. Use this to chat + * statelessly (without managed conversation persistence and without an + * Agent) by passing all context inline. + */ + // const inlineContext = {} + /** + * Optional. Reference to a persisted conversation and agent context. + * Use this to chat with an Agent using managed conversation persistence. + */ + // const conversationReference = {} + /** + * Optional. Context for the chat request. Use this to chat with an Agent + * statelessly, without managed conversation persistence. + */ + // const dataAgentContext = {} + /** + * Optional. The Google Cloud project to be used for quota and billing. + */ + // const project = 'abc123' + /** + * Required. The parent value for chat request. + * Pattern: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. Content of current conversation. + */ + // const messages = [1,2,3,4] + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callChat() { + // Construct request + const request = { + parent, + messages, + }; + + // Run request + const stream = await geminidataanalyticsClient.chat(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callChat(); + // [END geminidataanalytics_v1beta_generated_DataChatService_Chat_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.create_conversation.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.create_conversation.js new file mode 100644 index 000000000000..5690d472ea6b --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.create_conversation.js @@ -0,0 +1,81 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, conversation) { + // [START geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for CreateConversationRequest. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The conversation id of the conversation to create. + * Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + */ + // const conversationId = 'abc123' + /** + * Required. The conversation to create. + */ + // const conversation = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + */ + // const requestId = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callCreateConversation() { + // Construct request + const request = { + parent, + conversation, + }; + + // Run request + const response = await geminidataanalyticsClient.createConversation(request); + console.log(response); + } + + callCreateConversation(); + // [END geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.get_conversation.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.get_conversation.js new file mode 100644 index 000000000000..1173fe394c33 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.get_conversation.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START geminidataanalytics_v1beta_generated_DataChatService_GetConversation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + */ + // const name = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callGetConversation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await geminidataanalyticsClient.getConversation(request); + console.log(response); + } + + callGetConversation(); + // [END geminidataanalytics_v1beta_generated_DataChatService_GetConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_conversations.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_conversations.js new file mode 100644 index 000000000000..462b80f76830 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_conversations.js @@ -0,0 +1,81 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1beta_generated_DataChatService_ListConversations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agent_id + * * labels + */ + // const filter = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callListConversations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listConversationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConversations(); + // [END geminidataanalytics_v1beta_generated_DataChatService_ListConversations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_messages.js b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_messages.js new file mode 100644 index 000000000000..836cf15c6105 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_messages.js @@ -0,0 +1,83 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START geminidataanalytics_v1beta_generated_DataChatService_ListMessages_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. See AIP-160 (https://google.aip.dev/160) for + * syntax. + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + */ + // const filter = 'abc123' + + // Imports the Geminidataanalytics library + const {DataChatServiceClient} = require('@google-cloud/geminidataanalytics').v1beta; + + // Instantiates a client + const geminidataanalyticsClient = new DataChatServiceClient(); + + async function callListMessages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = geminidataanalyticsClient.listMessagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMessages(); + // [END geminidataanalytics_v1beta_generated_DataChatService_ListMessages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json new file mode 100644 index 000000000000..c82f0cb03280 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json @@ -0,0 +1,671 @@ +{ + "clientLibrary": { + "name": "nodejs-geminidataanalytics", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.geminidataanalytics.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_async", + "title": "DataAgentService listDataAgents Sample", + "origin": "API_DEFINITION", + "description": " Lists DataAgents in a given project and location.", + "canonical": true, + "file": "data_agent_service.list_data_agents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListDataAgents", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "ListDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListDataAgents", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_async", + "title": "DataAgentService listAccessibleDataAgents Sample", + "origin": "API_DEFINITION", + "description": " Lists DataAgents that are accessible to the caller in a given project and location.", + "canonical": true, + "file": "data_agent_service.list_accessible_data_agents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAccessibleDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListAccessibleDataAgents", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + }, + { + "name": "creator_filter", + "type": ".google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "ListAccessibleDataAgents", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListAccessibleDataAgents", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_async", + "title": "DataAgentService getDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single DataAgent.", + "canonical": true, + "file": "data_agent_service.get_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetDataAgent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.DataAgent", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "GetDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_async", + "title": "DataAgentService createDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Creates a new DataAgent in a given project and location.", + "canonical": true, + "file": "data_agent_service.create_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.CreateDataAgent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_agent_id", + "type": "TYPE_STRING" + }, + { + "name": "data_agent", + "type": ".google.cloud.geminidataanalytics.v1beta.DataAgent" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "CreateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.CreateDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_async", + "title": "DataAgentService updateDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single DataAgent.", + "canonical": true, + "file": "data_agent_service.update_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.UpdateDataAgent", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_agent", + "type": ".google.cloud.geminidataanalytics.v1beta.DataAgent" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "UpdateDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.UpdateDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_async", + "title": "DataAgentService deleteDataAgent Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single DataAgent.", + "canonical": true, + "file": "data_agent_service.delete_data_agent.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.DeleteDataAgent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "DeleteDataAgent", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.DeleteDataAgent", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_async", + "title": "DataAgentService getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the IAM policy for DataAgent", + "canonical": true, + "file": "data_agent_service.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetIamPolicy", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_async", + "title": "DataAgentService setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the IAM policy for a DataAgent.", + "canonical": true, + "file": "data_agent_service.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DataAgentServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService.SetIamPolicy", + "service": { + "shortName": "DataAgentService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataChatService_Chat_async", + "title": "DataAgentService chat Sample", + "origin": "API_DEFINITION", + "description": " Answers a data question by generating a stream of [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects.", + "canonical": true, + "file": "data_chat_service.chat.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "Chat", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.Chat", + "async": true, + "parameters": [ + { + "name": "inline_context", + "type": ".google.cloud.geminidataanalytics.v1beta.Context" + }, + { + "name": "conversation_reference", + "type": ".google.cloud.geminidataanalytics.v1beta.ConversationReference" + }, + { + "name": "data_agent_context", + "type": ".google.cloud.geminidataanalytics.v1beta.DataAgentContext" + }, + { + "name": "project", + "type": "TYPE_STRING" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "messages", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.Message", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatServiceClient" + }, + "method": { + "shortName": "Chat", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.Chat", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_async", + "title": "DataAgentService createConversation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new conversation to persist the conversation history. Each conversation will have multiple messages associated with it.", + "canonical": true, + "file": "data_chat_service.create_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConversation", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.CreateConversation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "conversation_id", + "type": "TYPE_STRING" + }, + { + "name": "conversation", + "type": ".google.cloud.geminidataanalytics.v1beta.Conversation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.Conversation", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatServiceClient" + }, + "method": { + "shortName": "CreateConversation", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.CreateConversation", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataChatService_GetConversation_async", + "title": "DataAgentService getConversation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single conversation by using conversation id and parent.", + "canonical": true, + "file": "data_chat_service.get_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConversation", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.GetConversation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.Conversation", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatServiceClient" + }, + "method": { + "shortName": "GetConversation", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.GetConversation", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataChatService_ListConversations_async", + "title": "DataAgentService listConversations Sample", + "origin": "API_DEFINITION", + "description": " Lists all conversations for a given parent.", + "canonical": true, + "file": "data_chat_service.list_conversations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConversations", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListConversations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.ListConversationsResponse", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatServiceClient" + }, + "method": { + "shortName": "ListConversations", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListConversations", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + } + }, + { + "regionTag": "geminidataanalytics_v1beta_generated_DataChatService_ListMessages_async", + "title": "DataAgentService listMessages Sample", + "origin": "API_DEFINITION", + "description": " Lists all messages for a given conversation.", + "canonical": true, + "file": "data_chat_service.list_messages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMessages", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListMessages", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.geminidataanalytics.v1beta.ListMessagesResponse", + "client": { + "shortName": "DataChatServiceClient", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatServiceClient" + }, + "method": { + "shortName": "ListMessages", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListMessages", + "service": { + "shortName": "DataChatService", + "fullName": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-geminidataanalytics/src/index.ts b/packages/google-cloud-geminidataanalytics/src/index.ts new file mode 100644 index 000000000000..ea343e2c5341 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/index.ts @@ -0,0 +1,30 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1alpha from './v1alpha'; +import * as v1beta from './v1beta'; + +const DataAgentServiceClient = v1beta.DataAgentServiceClient; +type DataAgentServiceClient = v1beta.DataAgentServiceClient; +const DataChatServiceClient = v1beta.DataChatServiceClient; +type DataChatServiceClient = v1beta.DataChatServiceClient; + +export {v1alpha, v1beta, DataAgentServiceClient, DataChatServiceClient}; +export default {v1alpha, v1beta, DataAgentServiceClient, DataChatServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_client.ts b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_client.ts new file mode 100644 index 000000000000..531203bb927d --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_client.ts @@ -0,0 +1,2029 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/data_agent_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_agent_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources. + * @class + * @memberof v1alpha + */ +export class DataAgentServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('geminidataanalytics'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataAgentServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataAgentServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataAgentServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataAgentServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'geminidataanalytics.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + conversationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversations/{conversation}' + ), + dataAgentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAgents/{data_agent}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listDataAgents: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAgents'), + listAccessibleDataAgents: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAgents') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1alpha/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1alpha/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1alpha/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1alpha/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1alpha/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1alpha/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createDataAgentResponse = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1alpha.DataAgent') as gax.protobuf.Type; + const createDataAgentMetadata = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1alpha.OperationMetadata') as gax.protobuf.Type; + const updateDataAgentResponse = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1alpha.DataAgent') as gax.protobuf.Type; + const updateDataAgentMetadata = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1alpha.OperationMetadata') as gax.protobuf.Type; + const deleteDataAgentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteDataAgentMetadata = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1alpha.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDataAgent: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDataAgentResponse.decode.bind(createDataAgentResponse), + createDataAgentMetadata.decode.bind(createDataAgentMetadata)), + updateDataAgent: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataAgentResponse.decode.bind(updateDataAgentResponse), + updateDataAgentMetadata.decode.bind(updateDataAgentMetadata)), + deleteDataAgent: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDataAgentResponse.decode.bind(deleteDataAgentResponse), + deleteDataAgentMetadata.decode.bind(deleteDataAgentMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.geminidataanalytics.v1alpha.DataAgentService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataAgentServiceStub) { + return this.dataAgentServiceStub; + } + + // Put together the "service stub" for + // google.cloud.geminidataanalytics.v1alpha.DataAgentService. + this.dataAgentServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.geminidataanalytics.v1alpha.DataAgentService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.geminidataanalytics.v1alpha.DataAgentService, + 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 dataAgentServiceStubMethods = + ['listDataAgents', 'listAccessibleDataAgents', 'getDataAgent', 'createDataAgent', 'updateDataAgent', 'deleteDataAgent', 'getIamPolicy', 'setIamPolicy']; + for (const methodName of dataAgentServiceStubMethods) { + const callPromise = this.dataAgentServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataAgentServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Gets details of a single DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.geminidataanalytics.v1alpha.DataAgent|DataAgent}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.get_data_agent.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_GetDataAgent_async + */ + getDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|undefined, {}|undefined + ]>; + getDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|null|undefined, + {}|null|undefined>): void; + getDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|null|undefined, + {}|null|undefined>): void; + getDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDataAgent request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataAgent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDataAgent(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent, + protos.google.cloud.geminidataanalytics.v1alpha.IGetDataAgentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDataAgent response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the IAM policy for DataAgent + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.get_iam_policy.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Sets the IAM policy for a DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.set_iam_policy.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('setIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('setIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.setIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('setIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates a new DataAgent in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} [request.dataAgentId] + * Optional. Id of the requesting object. Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgent} request.dataAgent + * Required. The resource being created. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.create_data_agent.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_CreateDataAgent_async + */ + createDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.ICreateDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createDataAgent response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createDataAgent request %j', request); + return this.innerApiCalls.createDataAgent(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createDataAgent response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createDataAgent()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.create_data_agent.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_CreateDataAgent_async + */ + async checkCreateDataAgentProgress(name: string): Promise>{ + this._log.info('createDataAgent long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createDataAgent, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask is used to specify the fields to be overwritten in the + * DataAgent resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields with non-default values + * present in the request will be overwritten. If a wildcard mask is provided, + * all fields will be overwritten. + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgent} request.dataAgent + * Required. The resource being updated. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.update_data_agent.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_UpdateDataAgent_async + */ + updateDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IUpdateDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'data_agent.name': request.dataAgent!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateDataAgent response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateDataAgent request %j', request); + return this.innerApiCalls.updateDataAgent(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateDataAgent response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateDataAgent()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.update_data_agent.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_UpdateDataAgent_async + */ + async checkUpdateDataAgentProgress(name: string): Promise>{ + this._log.info('updateDataAgent long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateDataAgent, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.delete_data_agent.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_DeleteDataAgent_async + */ + deleteDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAgent( + request: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteDataAgent response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteDataAgent request %j', request); + return this.innerApiCalls.deleteDataAgent(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteDataAgent response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteDataAgent()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.delete_data_agent.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_DeleteDataAgent_async + */ + async checkDeleteDataAgentProgress(name: string): Promise>{ + this._log.info('deleteDataAgent long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteDataAgent, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists DataAgents in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to 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 Array of {@link protos.google.cloud.geminidataanalytics.v1alpha.DataAgent|DataAgent}. + * 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 `listDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse + ]>; + listDataAgents( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>): void; + listDataAgents( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>): void; + listDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataAgents values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataAgents request %j', request); + return this.innerApiCalls + .listDataAgents(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsResponse + ]) => { + this._log.info('listDataAgents values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDataAgents`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1alpha.DataAgent|DataAgent} 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 `listDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataAgentsStream( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataAgents stream %j', request); + return this.descriptors.page.listDataAgents.createStream( + this.innerApiCalls.listDataAgents as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataAgents`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1alpha.DataAgent|DataAgent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.list_data_agents.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_ListDataAgents_async + */ + listDataAgentsAsync( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListDataAgentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataAgents iterate %j', request); + return this.descriptors.page.listDataAgents.asyncIterate( + this.innerApiCalls['listDataAgents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataAgents that are accessible to the caller in a given project and + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListAccessibleDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter} [request.creatorFilter] + * Optional. Filter for the creator of the agent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.geminidataanalytics.v1alpha.DataAgent|DataAgent}. + * 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 `listAccessibleDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAccessibleDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse + ]>; + listAccessibleDataAgents( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>): void; + listAccessibleDataAgents( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>): void; + listAccessibleDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAccessibleDataAgents values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAccessibleDataAgents request %j', request); + return this.innerApiCalls + .listAccessibleDataAgents(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsResponse + ]) => { + this._log.info('listAccessibleDataAgents values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAccessibleDataAgents`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListAccessibleDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter} [request.creatorFilter] + * Optional. Filter for the creator of the agent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1alpha.DataAgent|DataAgent} 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 `listAccessibleDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAccessibleDataAgentsStream( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAccessibleDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAccessibleDataAgents stream %j', request); + return this.descriptors.page.listAccessibleDataAgents.createStream( + this.innerApiCalls.listAccessibleDataAgents as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAccessibleDataAgents`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListAccessibleDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest.CreatorFilter} [request.creatorFilter] + * Optional. Filter for the creator of the agent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1alpha.DataAgent|DataAgent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_agent_service.list_accessible_data_agents.js + * region_tag:geminidataanalytics_v1alpha_generated_DataAgentService_ListAccessibleDataAgents_async + */ + listAccessibleDataAgentsAsync( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListAccessibleDataAgentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAccessibleDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAccessibleDataAgents iterate %j', request); + return this.descriptors.page.listAccessibleDataAgents.asyncIterate( + this.innerApiCalls['listAccessibleDataAgents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified conversation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversation + * @returns {string} Resource name string. + */ + conversationPath(project:string,location:string,conversation:string) { + return this.pathTemplates.conversationPathTemplate.render({ + project: project, + location: location, + conversation: conversation, + }); + } + + /** + * Parse the project from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).project; + } + + /** + * Parse the location from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).location; + } + + /** + * Parse the conversation from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the conversation. + */ + matchConversationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).conversation; + } + + /** + * Return a fully-qualified dataAgent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_agent + * @returns {string} Resource name string. + */ + dataAgentPath(project:string,location:string,dataAgent:string) { + return this.pathTemplates.dataAgentPathTemplate.render({ + project: project, + location: location, + data_agent: dataAgent, + }); + } + + /** + * Parse the project from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).project; + } + + /** + * Parse the location from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).location; + } + + /** + * Parse the data_agent from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the data_agent. + */ + matchDataAgentFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).data_agent; + } + + /** + * 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 project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataAgentServiceStub && !this._terminated) { + return this.dataAgentServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_client_config.json b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_client_config.json new file mode 100644 index 000000000000..862d82e949fb --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_client_config.json @@ -0,0 +1,78 @@ +{ + "interfaces": { + "google.cloud.geminidataanalytics.v1alpha.DataAgentService": { + "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": { + "ListDataAgents": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAccessibleDataAgents": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDataAgent": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateDataAgent": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDataAgent": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteDataAgent": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetIamPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "SetIamPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_proto_list.json b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_proto_list.json new file mode 100644 index 000000000000..3ae93b0fe641 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_agent_service_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/cloud/geminidataanalytics/v1alpha/context.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/conversation.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/credentials.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_agent_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_analytics_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/datasource.proto" +] diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_client.ts b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_client.ts new file mode 100644 index 000000000000..a7a9dae548d1 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_client.ts @@ -0,0 +1,1379 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform, PassThrough} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/data_chat_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_chat_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service to ask a natural language question on top of BigQuery + * and Looker Studio datasources to get back streamed responses of various kinds + * to help provide a rich conversational answer. + * @class + * @memberof v1alpha + */ +export class DataChatServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('geminidataanalytics'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataChatServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataChatServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataChatServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataChatServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'geminidataanalytics.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + conversationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversations/{conversation}' + ), + dataAgentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAgents/{data_agent}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listConversations: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'), + listMessages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'messages') + }; + + // Some of the methods on this service provide streaming responses. + // Provide descriptors for these. + this.descriptors.stream = { + chat: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.geminidataanalytics.v1alpha.DataChatService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataChatServiceStub) { + return this.dataChatServiceStub; + } + + // Put together the "service stub" for + // google.cloud.geminidataanalytics.v1alpha.DataChatService. + this.dataChatServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.geminidataanalytics.v1alpha.DataChatService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.geminidataanalytics.v1alpha.DataChatService, + 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 dataChatServiceStubMethods = + ['chat', 'createConversation', 'deleteConversation', 'getConversation', 'listConversations', 'listMessages']; + for (const methodName of dataChatServiceStubMethods) { + const callPromise = this.dataChatServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + if (methodName in this.descriptors.stream) { + const stream = new PassThrough({objectMode: true}); + setImmediate(() => { + stream.emit('error', new this._gaxModule.GoogleError('The client has already been closed.')); + }); + return stream; + } + 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.stream[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataChatServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Creates a new conversation to persist the conversation history. Each + * conversation will have multiple messages associated with it. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for CreateConversationRequest. + * Format: `projects/{project}/locations/{location}` + * @param {string} [request.conversationId] + * Optional. The conversation id of the conversation to create. + * Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + * @param {google.cloud.geminidataanalytics.v1alpha.Conversation} request.conversation + * Required. The conversation to create. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.geminidataanalytics.v1alpha.Conversation|Conversation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_chat_service.create_conversation.js + * region_tag:geminidataanalytics_v1alpha_generated_DataChatService_CreateConversation_async + */ + createConversation( + request?: protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|undefined, {}|undefined + ]>; + createConversation( + request: protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|null|undefined, + {}|null|undefined>): void; + createConversation( + request: protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|null|undefined, + {}|null|undefined>): void; + createConversation( + request?: protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createConversation request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createConversation response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createConversation(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.ICreateConversationRequest|undefined, + {}|undefined + ]) => { + this._log.info('createConversation response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a conversation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_chat_service.delete_conversation.js + * region_tag:geminidataanalytics_v1alpha_generated_DataChatService_DeleteConversation_async + */ + deleteConversation( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|undefined, {}|undefined + ]>; + deleteConversation( + request: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|null|undefined, + {}|null|undefined>): void; + deleteConversation( + request: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|null|undefined, + {}|null|undefined>): void; + deleteConversation( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteConversation request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteConversation response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteConversation(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.geminidataanalytics.v1alpha.IDeleteConversationRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteConversation response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details of a single conversation by using conversation id and parent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.geminidataanalytics.v1alpha.Conversation|Conversation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_chat_service.get_conversation.js + * region_tag:geminidataanalytics_v1alpha_generated_DataChatService_GetConversation_async + */ + getConversation( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|undefined, {}|undefined + ]>; + getConversation( + request: protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|null|undefined, + {}|null|undefined>): void; + getConversation( + request: protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|null|undefined, + {}|null|undefined>): void; + getConversation( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getConversation request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getConversation response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getConversation(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation, + protos.google.cloud.geminidataanalytics.v1alpha.IGetConversationRequest|undefined, + {}|undefined + ]) => { + this._log.info('getConversation response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Answers a data question by generating a stream of + * {@link protos.google.cloud.geminidataanalytics.v1alpha.Message|Message} objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.geminidataanalytics.v1alpha.Context} [request.inlineContext] + * Optional. Inline context for the chat request. Use this to chat + * statelessly (without managed conversation persistence and without an + * Agent) by passing all context inline. + * @param {google.cloud.geminidataanalytics.v1alpha.ConversationReference} [request.conversationReference] + * Optional. Reference to a persisted conversation and agent context. + * Use this to chat with an Agent using managed conversation persistence. + * @param {google.cloud.geminidataanalytics.v1alpha.DataAgentContext} [request.dataAgentContext] + * Optional. Context for the chat request. Use this to chat with an Agent + * statelessly, without managed conversation persistence. + * @param {string} [request.project] + * Optional. The Google Cloud project to be used for quota and billing. + * @param {string} request.parent + * Required. The parent value for chat request. + * Pattern: `projects/{project}/locations/{location}` + * @param {number[]} request.messages + * Required. Content of current conversation. + * @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 {@link protos.google.cloud.geminidataanalytics.v1alpha.Message|Message} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_chat_service.chat.js + * region_tag:geminidataanalytics_v1alpha_generated_DataChatService_Chat_async + */ + chat( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IChatRequest, + options?: CallOptions): + gax.CancellableStream{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('chat stream %j', options); + return this.innerApiCalls.chat(request, options); + } + + /** + * Lists all conversations for a given parent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agents + * * labels + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.geminidataanalytics.v1alpha.Conversation|Conversation}. + * 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 `listConversationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConversations( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation[], + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse + ]>; + listConversations( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IConversation>): void; + listConversations( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IConversation>): void; + listConversations( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IConversation>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IConversation>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation[], + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IConversation>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listConversations values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listConversations request %j', request); + return this.innerApiCalls + .listConversations(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1alpha.IConversation[], + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsResponse + ]) => { + this._log.info('listConversations values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listConversations`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agents + * * labels + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1alpha.Conversation|Conversation} 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 `listConversationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConversationsStream( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listConversations stream %j', request); + return this.descriptors.page.listConversations.createStream( + this.innerApiCalls.listConversations as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listConversations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agents + * * labels + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1alpha.Conversation|Conversation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_chat_service.list_conversations.js + * region_tag:geminidataanalytics_v1alpha_generated_DataChatService_ListConversations_async + */ + listConversationsAsync( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListConversationsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listConversations iterate %j', request); + return this.descriptors.page.listConversations.asyncIterate( + this.innerApiCalls['listConversations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all messages for a given conversation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage|StorageMessage}. + * 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 `listMessagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMessages( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage[], + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse + ]>; + listMessages( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage>): void; + listMessages( + request: protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage>): void; + listMessages( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage[], + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMessages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMessages request %j', request); + return this.innerApiCalls + .listMessages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage[], + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest|null, + protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesResponse + ]) => { + this._log.info('listMessages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listMessages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage|StorageMessage} 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 `listMessagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMessagesStream( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMessages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMessages stream %j', request); + return this.descriptors.page.listMessages.createStream( + this.innerApiCalls.listMessages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMessages`, 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 conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage|StorageMessage}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/data_chat_service.list_messages.js + * region_tag:geminidataanalytics_v1alpha_generated_DataChatService_ListMessages_async + */ + listMessagesAsync( + request?: protos.google.cloud.geminidataanalytics.v1alpha.IListMessagesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMessages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMessages iterate %j', request); + return this.descriptors.page.listMessages.asyncIterate( + this.innerApiCalls['listMessages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified conversation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversation + * @returns {string} Resource name string. + */ + conversationPath(project:string,location:string,conversation:string) { + return this.pathTemplates.conversationPathTemplate.render({ + project: project, + location: location, + conversation: conversation, + }); + } + + /** + * Parse the project from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).project; + } + + /** + * Parse the location from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).location; + } + + /** + * Parse the conversation from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the conversation. + */ + matchConversationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).conversation; + } + + /** + * Return a fully-qualified dataAgent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_agent + * @returns {string} Resource name string. + */ + dataAgentPath(project:string,location:string,dataAgent:string) { + return this.pathTemplates.dataAgentPathTemplate.render({ + project: project, + location: location, + data_agent: dataAgent, + }); + } + + /** + * Parse the project from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).project; + } + + /** + * Parse the location from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).location; + } + + /** + * Parse the data_agent from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the data_agent. + */ + matchDataAgentFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).data_agent; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataChatServiceStub && !this._terminated) { + return this.dataChatServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_client_config.json b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_client_config.json new file mode 100644 index 000000000000..b4235802259e --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_client_config.json @@ -0,0 +1,68 @@ +{ + "interfaces": { + "google.cloud.geminidataanalytics.v1alpha.DataChatService": { + "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": { + "Chat": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateConversation": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteConversation": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetConversation": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListConversations": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListMessages": { + "timeout_millis": 600000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_proto_list.json b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_proto_list.json new file mode 100644 index 000000000000..3ae93b0fe641 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/data_chat_service_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/cloud/geminidataanalytics/v1alpha/context.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/conversation.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/credentials.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_agent_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_analytics_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1alpha/datasource.proto" +] diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/gapic_metadata.json b/packages/google-cloud-geminidataanalytics/src/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..bb74472fabd0 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/gapic_metadata.json @@ -0,0 +1,188 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.geminidataanalytics.v1alpha", + "libraryPackage": "@google-cloud/geminidataanalytics", + "services": { + "DataAgentService": { + "clients": { + "grpc": { + "libraryClient": "DataAgentServiceClient", + "rpcs": { + "GetDataAgent": { + "methods": [ + "getDataAgent" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "CreateDataAgent": { + "methods": [ + "createDataAgent" + ] + }, + "UpdateDataAgent": { + "methods": [ + "updateDataAgent" + ] + }, + "DeleteDataAgent": { + "methods": [ + "deleteDataAgent" + ] + }, + "ListDataAgents": { + "methods": [ + "listDataAgents", + "listDataAgentsStream", + "listDataAgentsAsync" + ] + }, + "ListAccessibleDataAgents": { + "methods": [ + "listAccessibleDataAgents", + "listAccessibleDataAgentsStream", + "listAccessibleDataAgentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataAgentServiceClient", + "rpcs": { + "GetDataAgent": { + "methods": [ + "getDataAgent" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "CreateDataAgent": { + "methods": [ + "createDataAgent" + ] + }, + "UpdateDataAgent": { + "methods": [ + "updateDataAgent" + ] + }, + "DeleteDataAgent": { + "methods": [ + "deleteDataAgent" + ] + }, + "ListDataAgents": { + "methods": [ + "listDataAgents", + "listDataAgentsStream", + "listDataAgentsAsync" + ] + }, + "ListAccessibleDataAgents": { + "methods": [ + "listAccessibleDataAgents", + "listAccessibleDataAgentsStream", + "listAccessibleDataAgentsAsync" + ] + } + } + } + } + }, + "DataChatService": { + "clients": { + "grpc": { + "libraryClient": "DataChatServiceClient", + "rpcs": { + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "DeleteConversation": { + "methods": [ + "deleteConversation" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "Chat": { + "methods": [ + "chat" + ] + }, + "ListConversations": { + "methods": [ + "listConversations", + "listConversationsStream", + "listConversationsAsync" + ] + }, + "ListMessages": { + "methods": [ + "listMessages", + "listMessagesStream", + "listMessagesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataChatServiceClient", + "rpcs": { + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "DeleteConversation": { + "methods": [ + "deleteConversation" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "ListConversations": { + "methods": [ + "listConversations", + "listConversationsStream", + "listConversationsAsync" + ] + }, + "ListMessages": { + "methods": [ + "listMessages", + "listMessagesStream", + "listMessagesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-geminidataanalytics/src/v1alpha/index.ts b/packages/google-cloud-geminidataanalytics/src/v1alpha/index.ts new file mode 100644 index 000000000000..609441a69025 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1alpha/index.ts @@ -0,0 +1,20 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {DataAgentServiceClient} from './data_agent_service_client'; +export {DataChatServiceClient} from './data_chat_service_client'; diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_client.ts b/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_client.ts new file mode 100644 index 000000000000..c3daef9ff69d --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_client.ts @@ -0,0 +1,2029 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/data_agent_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_agent_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources. + * @class + * @memberof v1beta + */ +export class DataAgentServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('geminidataanalytics'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataAgentServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataAgentServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataAgentServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataAgentServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'geminidataanalytics.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + conversationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversations/{conversation}' + ), + dataAgentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAgents/{data_agent}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listDataAgents: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAgents'), + listAccessibleDataAgents: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAgents') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1beta/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createDataAgentResponse = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1beta.DataAgent') as gax.protobuf.Type; + const createDataAgentMetadata = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1beta.OperationMetadata') as gax.protobuf.Type; + const updateDataAgentResponse = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1beta.DataAgent') as gax.protobuf.Type; + const updateDataAgentMetadata = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1beta.OperationMetadata') as gax.protobuf.Type; + const deleteDataAgentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteDataAgentMetadata = protoFilesRoot.lookup( + '.google.cloud.geminidataanalytics.v1beta.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDataAgent: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDataAgentResponse.decode.bind(createDataAgentResponse), + createDataAgentMetadata.decode.bind(createDataAgentMetadata)), + updateDataAgent: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataAgentResponse.decode.bind(updateDataAgentResponse), + updateDataAgentMetadata.decode.bind(updateDataAgentMetadata)), + deleteDataAgent: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDataAgentResponse.decode.bind(deleteDataAgentResponse), + deleteDataAgentMetadata.decode.bind(deleteDataAgentMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.geminidataanalytics.v1beta.DataAgentService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataAgentServiceStub) { + return this.dataAgentServiceStub; + } + + // Put together the "service stub" for + // google.cloud.geminidataanalytics.v1beta.DataAgentService. + this.dataAgentServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.geminidataanalytics.v1beta.DataAgentService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.geminidataanalytics.v1beta.DataAgentService, + 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 dataAgentServiceStubMethods = + ['listDataAgents', 'listAccessibleDataAgents', 'getDataAgent', 'createDataAgent', 'updateDataAgent', 'deleteDataAgent', 'getIamPolicy', 'setIamPolicy']; + for (const methodName of dataAgentServiceStubMethods) { + const callPromise = this.dataAgentServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataAgentServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Gets details of a single DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.geminidataanalytics.v1beta.DataAgent|DataAgent}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.get_data_agent.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_async + */ + getDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|undefined, {}|undefined + ]>; + getDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|null|undefined, + {}|null|undefined>): void; + getDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|null|undefined, + {}|null|undefined>): void; + getDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDataAgent request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataAgent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDataAgent(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent, + protos.google.cloud.geminidataanalytics.v1beta.IGetDataAgentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDataAgent response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the IAM policy for DataAgent + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.get_iam_policy.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Sets the IAM policy for a DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.set_iam_policy.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('setIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('setIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.setIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('setIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates a new DataAgent in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} [request.dataAgentId] + * Optional. Id of the requesting object. Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + * @param {google.cloud.geminidataanalytics.v1beta.DataAgent} request.dataAgent + * Required. The resource being created. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.create_data_agent.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_async + */ + createDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.ICreateDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createDataAgent response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createDataAgent request %j', request); + return this.innerApiCalls.createDataAgent(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createDataAgent response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createDataAgent()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.create_data_agent.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_async + */ + async checkCreateDataAgentProgress(name: string): Promise>{ + this._log.info('createDataAgent long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createDataAgent, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask is used to specify the fields to be overwritten in the + * DataAgent resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields with non-default values + * present in the request will be overwritten. If a wildcard mask is provided, + * all fields will be overwritten. + * @param {google.cloud.geminidataanalytics.v1beta.DataAgent} request.dataAgent + * Required. The resource being updated. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.update_data_agent.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_async + */ + updateDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.IUpdateDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'data_agent.name': request.dataAgent!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateDataAgent response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateDataAgent request %j', request); + return this.innerApiCalls.updateDataAgent(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateDataAgent response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateDataAgent()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.update_data_agent.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_async + */ + async checkUpdateDataAgentProgress(name: string): Promise>{ + this._log.info('updateDataAgent long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateDataAgent, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single DataAgent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.delete_data_agent.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_async + */ + deleteDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAgent( + request: protos.google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAgent( + request?: protos.google.cloud.geminidataanalytics.v1beta.IDeleteDataAgentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteDataAgent response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteDataAgent request %j', request); + return this.innerApiCalls.deleteDataAgent(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteDataAgent response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteDataAgent()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.delete_data_agent.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_async + */ + async checkDeleteDataAgentProgress(name: string): Promise>{ + this._log.info('deleteDataAgent long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteDataAgent, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists DataAgents in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to 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 Array of {@link protos.google.cloud.geminidataanalytics.v1beta.DataAgent|DataAgent}. + * 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 `listDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse + ]>; + listDataAgents( + request: protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>): void; + listDataAgents( + request: protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>): void; + listDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataAgents values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataAgents request %j', request); + return this.innerApiCalls + .listDataAgents(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsResponse + ]) => { + this._log.info('listDataAgents values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDataAgents`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1beta.DataAgent|DataAgent} 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 `listDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataAgentsStream( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataAgents stream %j', request); + return this.descriptors.page.listDataAgents.createStream( + this.innerApiCalls.listDataAgents as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataAgents`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataAgents` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataAgents` must + * match the call that provided the page token. The service may return fewer + * than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1beta.DataAgent|DataAgent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.list_data_agents.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_async + */ + listDataAgentsAsync( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListDataAgentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataAgents iterate %j', request); + return this.descriptors.page.listDataAgents.asyncIterate( + this.innerApiCalls['listDataAgents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataAgents that are accessible to the caller in a given project and + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListAccessibleDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter} [request.creatorFilter] + * Optional. Filter for the creator of the agent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.geminidataanalytics.v1beta.DataAgent|DataAgent}. + * 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 `listAccessibleDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAccessibleDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse + ]>; + listAccessibleDataAgents( + request: protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>): void; + listAccessibleDataAgents( + request: protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>): void; + listAccessibleDataAgents( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAccessibleDataAgents values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAccessibleDataAgents request %j', request); + return this.innerApiCalls + .listAccessibleDataAgents(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[], + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsResponse + ]) => { + this._log.info('listAccessibleDataAgents values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listAccessibleDataAgents`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListAccessibleDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter} [request.creatorFilter] + * Optional. Filter for the creator of the agent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1beta.DataAgent|DataAgent} 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 `listAccessibleDataAgentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAccessibleDataAgentsStream( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAccessibleDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAccessibleDataAgents stream %j', request); + return this.descriptors.page.listAccessibleDataAgents.createStream( + this.innerApiCalls.listAccessibleDataAgents as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAccessibleDataAgents`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListAccessibleDataAgentsRequest. + * @param {number} [request.pageSize] + * Optional. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListAccessibleDataAgents` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAccessibleDataAgents` must match the call that provided the page + * token. The service may return fewer than this value. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * @param {string} [request.orderBy] + * Optional. User specification for how to order the results. + * @param {boolean} [request.showDeleted] + * Optional. If true, the list results will include soft-deleted DataAgents. + * Defaults to false. + * @param {google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter} [request.creatorFilter] + * Optional. Filter for the creator of the agent. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1beta.DataAgent|DataAgent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_agent_service.list_accessible_data_agents.js + * region_tag:geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_async + */ + listAccessibleDataAgentsAsync( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListAccessibleDataAgentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAccessibleDataAgents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listAccessibleDataAgents iterate %j', request); + return this.descriptors.page.listAccessibleDataAgents.asyncIterate( + this.innerApiCalls['listAccessibleDataAgents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified conversation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversation + * @returns {string} Resource name string. + */ + conversationPath(project:string,location:string,conversation:string) { + return this.pathTemplates.conversationPathTemplate.render({ + project: project, + location: location, + conversation: conversation, + }); + } + + /** + * Parse the project from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).project; + } + + /** + * Parse the location from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).location; + } + + /** + * Parse the conversation from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the conversation. + */ + matchConversationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).conversation; + } + + /** + * Return a fully-qualified dataAgent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_agent + * @returns {string} Resource name string. + */ + dataAgentPath(project:string,location:string,dataAgent:string) { + return this.pathTemplates.dataAgentPathTemplate.render({ + project: project, + location: location, + data_agent: dataAgent, + }); + } + + /** + * Parse the project from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).project; + } + + /** + * Parse the location from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).location; + } + + /** + * Parse the data_agent from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the data_agent. + */ + matchDataAgentFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).data_agent; + } + + /** + * 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 project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataAgentServiceStub && !this._terminated) { + return this.dataAgentServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_client_config.json b/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_client_config.json new file mode 100644 index 000000000000..f357fd387e75 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_client_config.json @@ -0,0 +1,78 @@ +{ + "interfaces": { + "google.cloud.geminidataanalytics.v1beta.DataAgentService": { + "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": { + "ListDataAgents": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAccessibleDataAgents": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDataAgent": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateDataAgent": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDataAgent": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteDataAgent": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_proto_list.json b/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_proto_list.json new file mode 100644 index 000000000000..1acb83ca3af0 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/data_agent_service_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/cloud/geminidataanalytics/v1beta/context.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/conversation.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/credentials.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_agent_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/datasource.proto" +] diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_client.ts b/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_client.ts new file mode 100644 index 000000000000..0915da509828 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_client.ts @@ -0,0 +1,1283 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform, PassThrough} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/data_chat_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_chat_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service to ask a natural language question on top of BigQuery + * and Looker Studio datasources to get back streamed responses of various kinds + * to help provide a rich conversational answer. + * @class + * @memberof v1beta + */ +export class DataChatServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('geminidataanalytics'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + dataChatServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataChatServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataChatServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataChatServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'geminidataanalytics.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + conversationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversations/{conversation}' + ), + dataAgentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAgents/{data_agent}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listConversations: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'), + listMessages: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'messages') + }; + + // Some of the methods on this service provide streaming responses. + // Provide descriptors for these. + this.descriptors.stream = { + chat: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.geminidataanalytics.v1beta.DataChatService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataChatServiceStub) { + return this.dataChatServiceStub; + } + + // Put together the "service stub" for + // google.cloud.geminidataanalytics.v1beta.DataChatService. + this.dataChatServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.geminidataanalytics.v1beta.DataChatService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.geminidataanalytics.v1beta.DataChatService, + 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 dataChatServiceStubMethods = + ['chat', 'createConversation', 'getConversation', 'listConversations', 'listMessages']; + for (const methodName of dataChatServiceStubMethods) { + const callPromise = this.dataChatServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + if (methodName in this.descriptors.stream) { + const stream = new PassThrough({objectMode: true}); + setImmediate(() => { + stream.emit('error', new this._gaxModule.GoogleError('The client has already been closed.')); + }); + return stream; + } + 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.stream[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataChatServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'geminidataanalytics.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Creates a new conversation to persist the conversation history. Each + * conversation will have multiple messages associated with it. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for CreateConversationRequest. + * Format: `projects/{project}/locations/{location}` + * @param {string} [request.conversationId] + * Optional. The conversation id of the conversation to create. + * Must be unique within the parent. + * The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * If not provided, the server will auto-generate a value for the id. + * @param {google.cloud.geminidataanalytics.v1beta.Conversation} request.conversation + * Required. The conversation to create. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.geminidataanalytics.v1beta.Conversation|Conversation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_chat_service.create_conversation.js + * region_tag:geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_async + */ + createConversation( + request?: protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|undefined, {}|undefined + ]>; + createConversation( + request: protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|null|undefined, + {}|null|undefined>): void; + createConversation( + request: protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|null|undefined, + {}|null|undefined>): void; + createConversation( + request?: protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createConversation request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createConversation response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createConversation(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.ICreateConversationRequest|undefined, + {}|undefined + ]) => { + this._log.info('createConversation response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details of a single conversation by using conversation id and parent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.geminidataanalytics.v1beta.Conversation|Conversation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_chat_service.get_conversation.js + * region_tag:geminidataanalytics_v1beta_generated_DataChatService_GetConversation_async + */ + getConversation( + request?: protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|undefined, {}|undefined + ]>; + getConversation( + request: protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|null|undefined, + {}|null|undefined>): void; + getConversation( + request: protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest, + callback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|null|undefined, + {}|null|undefined>): void; + getConversation( + request?: protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getConversation request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getConversation response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getConversation(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.geminidataanalytics.v1beta.IConversation, + protos.google.cloud.geminidataanalytics.v1beta.IGetConversationRequest|undefined, + {}|undefined + ]) => { + this._log.info('getConversation response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Answers a data question by generating a stream of + * {@link protos.google.cloud.geminidataanalytics.v1alpha.Message|Message} objects. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.geminidataanalytics.v1beta.Context} [request.inlineContext] + * Optional. Inline context for the chat request. Use this to chat + * statelessly (without managed conversation persistence and without an + * Agent) by passing all context inline. + * @param {google.cloud.geminidataanalytics.v1beta.ConversationReference} [request.conversationReference] + * Optional. Reference to a persisted conversation and agent context. + * Use this to chat with an Agent using managed conversation persistence. + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentContext} [request.dataAgentContext] + * Optional. Context for the chat request. Use this to chat with an Agent + * statelessly, without managed conversation persistence. + * @param {string} [request.project] + * Optional. The Google Cloud project to be used for quota and billing. + * @param {string} request.parent + * Required. The parent value for chat request. + * Pattern: `projects/{project}/locations/{location}` + * @param {number[]} request.messages + * Required. Content of current conversation. + * @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 {@link protos.google.cloud.geminidataanalytics.v1beta.Message|Message} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_chat_service.chat.js + * region_tag:geminidataanalytics_v1beta_generated_DataChatService_Chat_async + */ + chat( + request?: protos.google.cloud.geminidataanalytics.v1beta.IChatRequest, + options?: CallOptions): + gax.CancellableStream{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('chat stream %j', options); + return this.innerApiCalls.chat(request, options); + } + + /** + * Lists all conversations for a given parent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agent_id + * * labels + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.geminidataanalytics.v1beta.Conversation|Conversation}. + * 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 `listConversationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConversations( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IConversation[], + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse + ]>; + listConversations( + request: protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IConversation>): void; + listConversations( + request: protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IConversation>): void; + listConversations( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IConversation>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IConversation>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IConversation[], + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IConversation>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listConversations values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listConversations request %j', request); + return this.innerApiCalls + .listConversations(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1beta.IConversation[], + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListConversationsResponse + ]) => { + this._log.info('listConversations values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listConversations`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agent_id + * * labels + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1beta.Conversation|Conversation} 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 `listConversationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConversationsStream( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listConversations stream %j', request); + return this.descriptors.page.listConversations.createStream( + this.innerApiCalls.listConversations as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listConversations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConversationsRequest. + * Format: `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Returned conversations will match criteria specified within the + * filter. ListConversations allows filtering by: + * * agent_id + * * labels + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1beta.Conversation|Conversation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_chat_service.list_conversations.js + * region_tag:geminidataanalytics_v1beta_generated_DataChatService_ListConversations_async + */ + listConversationsAsync( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListConversationsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listConversations iterate %j', request); + return this.descriptors.page.listConversations.asyncIterate( + this.innerApiCalls['listConversations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all messages for a given conversation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.geminidataanalytics.v1beta.StorageMessage|StorageMessage}. + * 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 `listMessagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMessages( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage[], + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse + ]>; + listMessages( + request: protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage>): void; + listMessages( + request: protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + callback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage>): void; + listMessages( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage>, + callback?: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage>): + Promise<[ + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage[], + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse|null|undefined, + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMessages values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMessages request %j', request); + return this.innerApiCalls + .listMessages(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage[], + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest|null, + protos.google.cloud.geminidataanalytics.v1beta.IListMessagesResponse + ]) => { + this._log.info('listMessages values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listMessages`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.geminidataanalytics.v1beta.StorageMessage|StorageMessage} 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 `listMessagesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMessagesStream( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMessages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMessages stream %j', request); + return this.descriptors.page.listMessages.createStream( + this.innerApiCalls.listMessages as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMessages`, 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 conversation to list messages under. + * Format: + * `projects/{project}/locations/{location}/conversations/{conversation_id}` + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. The max page size is 100. All larger page sizes will be coerced + * to 100. If unspecified, server will pick 50 as an approperiate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + * syntax. + * + * ListMessages allows filtering by: + * * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + * * update_time + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.geminidataanalytics.v1beta.StorageMessage|StorageMessage}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/data_chat_service.list_messages.js + * region_tag:geminidataanalytics_v1beta_generated_DataChatService_ListMessages_async + */ + listMessagesAsync( + request?: protos.google.cloud.geminidataanalytics.v1beta.IListMessagesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMessages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMessages iterate %j', request); + return this.descriptors.page.listMessages.asyncIterate( + this.innerApiCalls['listMessages'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified conversation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversation + * @returns {string} Resource name string. + */ + conversationPath(project:string,location:string,conversation:string) { + return this.pathTemplates.conversationPathTemplate.render({ + project: project, + location: location, + conversation: conversation, + }); + } + + /** + * Parse the project from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).project; + } + + /** + * Parse the location from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).location; + } + + /** + * Parse the conversation from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the conversation. + */ + matchConversationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName).conversation; + } + + /** + * Return a fully-qualified dataAgent resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_agent + * @returns {string} Resource name string. + */ + dataAgentPath(project:string,location:string,dataAgent:string) { + return this.pathTemplates.dataAgentPathTemplate.render({ + project: project, + location: location, + data_agent: dataAgent, + }); + } + + /** + * Parse the project from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).project; + } + + /** + * Parse the location from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).location; + } + + /** + * Parse the data_agent from DataAgent resource. + * + * @param {string} dataAgentName + * A fully-qualified path representing DataAgent resource. + * @returns {string} A string representing the data_agent. + */ + matchDataAgentFromDataAgentName(dataAgentName: string) { + return this.pathTemplates.dataAgentPathTemplate.match(dataAgentName).data_agent; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataChatServiceStub && !this._terminated) { + return this.dataChatServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_client_config.json b/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_client_config.json new file mode 100644 index 000000000000..7b519a2e4c41 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_client_config.json @@ -0,0 +1,63 @@ +{ + "interfaces": { + "google.cloud.geminidataanalytics.v1beta.DataChatService": { + "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": { + "Chat": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateConversation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetConversation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListConversations": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListMessages": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_proto_list.json b/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_proto_list.json new file mode 100644 index 000000000000..1acb83ca3af0 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/data_chat_service_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/cloud/geminidataanalytics/v1beta/context.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/conversation.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/credentials.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_agent_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto", + "../../protos/google/cloud/geminidataanalytics/v1beta/datasource.proto" +] diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/gapic_metadata.json b/packages/google-cloud-geminidataanalytics/src/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..347752a4d1a8 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/gapic_metadata.json @@ -0,0 +1,178 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.geminidataanalytics.v1beta", + "libraryPackage": "@google-cloud/geminidataanalytics", + "services": { + "DataAgentService": { + "clients": { + "grpc": { + "libraryClient": "DataAgentServiceClient", + "rpcs": { + "GetDataAgent": { + "methods": [ + "getDataAgent" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "CreateDataAgent": { + "methods": [ + "createDataAgent" + ] + }, + "UpdateDataAgent": { + "methods": [ + "updateDataAgent" + ] + }, + "DeleteDataAgent": { + "methods": [ + "deleteDataAgent" + ] + }, + "ListDataAgents": { + "methods": [ + "listDataAgents", + "listDataAgentsStream", + "listDataAgentsAsync" + ] + }, + "ListAccessibleDataAgents": { + "methods": [ + "listAccessibleDataAgents", + "listAccessibleDataAgentsStream", + "listAccessibleDataAgentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataAgentServiceClient", + "rpcs": { + "GetDataAgent": { + "methods": [ + "getDataAgent" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "CreateDataAgent": { + "methods": [ + "createDataAgent" + ] + }, + "UpdateDataAgent": { + "methods": [ + "updateDataAgent" + ] + }, + "DeleteDataAgent": { + "methods": [ + "deleteDataAgent" + ] + }, + "ListDataAgents": { + "methods": [ + "listDataAgents", + "listDataAgentsStream", + "listDataAgentsAsync" + ] + }, + "ListAccessibleDataAgents": { + "methods": [ + "listAccessibleDataAgents", + "listAccessibleDataAgentsStream", + "listAccessibleDataAgentsAsync" + ] + } + } + } + } + }, + "DataChatService": { + "clients": { + "grpc": { + "libraryClient": "DataChatServiceClient", + "rpcs": { + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "Chat": { + "methods": [ + "chat" + ] + }, + "ListConversations": { + "methods": [ + "listConversations", + "listConversationsStream", + "listConversationsAsync" + ] + }, + "ListMessages": { + "methods": [ + "listMessages", + "listMessagesStream", + "listMessagesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataChatServiceClient", + "rpcs": { + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "ListConversations": { + "methods": [ + "listConversations", + "listConversationsStream", + "listConversationsAsync" + ] + }, + "ListMessages": { + "methods": [ + "listMessages", + "listMessagesStream", + "listMessagesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-geminidataanalytics/src/v1beta/index.ts b/packages/google-cloud-geminidataanalytics/src/v1beta/index.ts new file mode 100644 index 000000000000..609441a69025 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/src/v1beta/index.ts @@ -0,0 +1,20 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {DataAgentServiceClient} from './data_agent_service_client'; +export {DataChatServiceClient} from './data_chat_service_client'; diff --git a/packages/google-cloud-geminidataanalytics/system-test/fixtures/sample/src/index.js b/packages/google-cloud-geminidataanalytics/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..df49c0b05b02 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 geminidataanalytics = require('@google-cloud/geminidataanalytics'); + +function main() { + const dataAgentServiceClient = new geminidataanalytics.DataAgentServiceClient(); + const dataChatServiceClient = new geminidataanalytics.DataChatServiceClient(); +} + +main(); diff --git a/packages/google-cloud-geminidataanalytics/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-geminidataanalytics/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..6693a6f69f17 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,38 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {DataAgentServiceClient, DataChatServiceClient} from '@google-cloud/geminidataanalytics'; + +// check that the client class type name can be used +function doStuffWithDataAgentServiceClient(client: DataAgentServiceClient) { + client.close(); +} +function doStuffWithDataChatServiceClient(client: DataChatServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const dataAgentServiceClient = new DataAgentServiceClient(); + doStuffWithDataAgentServiceClient(dataAgentServiceClient); + // check that the client instance can be created + const dataChatServiceClient = new DataChatServiceClient(); + doStuffWithDataChatServiceClient(dataChatServiceClient); +} + +main(); diff --git a/packages/google-cloud-geminidataanalytics/system-test/install.ts b/packages/google-cloud-geminidataanalytics/system-test/install.ts new file mode 100644 index 000000000000..2a505d6df0c5 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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-geminidataanalytics/test/gapic_data_agent_service_v1alpha.ts b/packages/google-cloud-geminidataanalytics/test/gapic_data_agent_service_v1alpha.ts new file mode 100644 index 000000000000..a7801d66bfca --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/test/gapic_data_agent_service_v1alpha.ts @@ -0,0 +1,2141 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 dataagentserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.DataAgentServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = dataagentserviceModule.v1alpha.DataAgentServiceClient.servicePath; + assert.strictEqual(servicePath, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = dataagentserviceModule.v1alpha.DataAgentServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new dataagentserviceModule.v1alpha.DataAgentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = dataagentserviceModule.v1alpha.DataAgentServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataAgentServiceStub, undefined); + await client.initialize(); + assert(client.dataAgentServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.dataAgentServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataAgentServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + 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 dataagentserviceModule.v1alpha.DataAgentServiceClient({ + 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('getDataAgent', () => { + it('invokes getDataAgent without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent() + ); + client.innerApiCalls.getDataAgent = stubSimpleCall(expectedResponse); + const [response] = await client.getDataAgent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent() + ); + client.innerApiCalls.getDataAgent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataAgent( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAgent with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataAgent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAgent with closed client', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDataAgent(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('createDataAgent', () => { + it('invokes createDataAgent without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAgent = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDataAgent(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAgent = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataAgent( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAgent with call error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAgent = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAgent with LRO error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAgent = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDataAgent(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDataAgentProgress without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateDataAgentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDataAgentProgress with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateDataAgentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataAgent', () => { + it('invokes updateDataAgent without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAgent = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataAgent(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAgent = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataAgent( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAgent with call error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAgent = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAgent with LRO error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAgent = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataAgent(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataAgentProgress without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateDataAgentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataAgentProgress with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateDataAgentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDataAgent', () => { + it('invokes deleteDataAgent without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAgent = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDataAgent(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAgent = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataAgent( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAgent with call error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAgent = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAgent with LRO error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAgent = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDataAgent(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDataAgentProgress without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteDataAgentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDataAgentProgress with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteDataAgentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listDataAgents', () => { + it('invokes listDataAgents without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.innerApiCalls.listDataAgents = stubSimpleCall(expectedResponse); + const [response] = await client.listDataAgents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAgents without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.innerApiCalls.listDataAgents = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataAgents( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAgents with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataAgents = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataAgents(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAgentsStream without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.descriptors.page.listDataAgents.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent) => { + 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.listDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAgents, request)); + assert( + (client.descriptors.page.listDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataAgentsStream with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAgents.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAgents, request)); + assert( + (client.descriptors.page.listDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAgents without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.descriptors.page.listDataAgents.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[] = []; + const iterable = client.listDataAgentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAgents with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAgents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataAgentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAccessibleDataAgents', () => { + it('invokes listAccessibleDataAgents without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.innerApiCalls.listAccessibleDataAgents = stubSimpleCall(expectedResponse); + const [response] = await client.listAccessibleDataAgents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAccessibleDataAgents without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.innerApiCalls.listAccessibleDataAgents = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccessibleDataAgents( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAccessibleDataAgents with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAccessibleDataAgents = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAccessibleDataAgents(request), expectedError); + const actualRequest = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAccessibleDataAgentsStream without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.descriptors.page.listAccessibleDataAgents.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAccessibleDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent) => { + 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.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAccessibleDataAgents, request)); + assert( + (client.descriptors.page.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAccessibleDataAgentsStream with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAccessibleDataAgents.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAccessibleDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.DataAgent) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAccessibleDataAgents, request)); + assert( + (client.descriptors.page.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAccessibleDataAgents without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.DataAgent()), + ]; + client.descriptors.page.listAccessibleDataAgents.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[] = []; + const iterable = client.listAccessibleDataAgentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAccessibleDataAgents with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAccessibleDataAgents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccessibleDataAgentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IDataAgent[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('conversation', async () => { + const fakePath = "/rendered/path/conversation"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + conversation: "conversationValue", + }; + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.conversationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.conversationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('conversationPath', () => { + const result = client.conversationPath("projectValue", "locationValue", "conversationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.conversationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConversationName', () => { + const result = client.matchProjectFromConversationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromConversationName', () => { + const result = client.matchLocationFromConversationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchConversationFromConversationName', () => { + const result = client.matchConversationFromConversationName(fakePath); + assert.strictEqual(result, "conversationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAgent', async () => { + const fakePath = "/rendered/path/dataAgent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_agent: "dataAgentValue", + }; + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataAgentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAgentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAgentPath', () => { + const result = client.dataAgentPath("projectValue", "locationValue", "dataAgentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAgentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAgentName', () => { + const result = client.matchProjectFromDataAgentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAgentName', () => { + const result = client.matchLocationFromDataAgentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAgentFromDataAgentName', () => { + const result = client.matchDataAgentFromDataAgentName(fakePath); + assert.strictEqual(result, "dataAgentValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new dataagentserviceModule.v1alpha.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-geminidataanalytics/test/gapic_data_agent_service_v1beta.ts b/packages/google-cloud-geminidataanalytics/test/gapic_data_agent_service_v1beta.ts new file mode 100644 index 000000000000..9750f003eac2 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/test/gapic_data_agent_service_v1beta.ts @@ -0,0 +1,2141 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 dataagentserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta.DataAgentServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = dataagentserviceModule.v1beta.DataAgentServiceClient.servicePath; + assert.strictEqual(servicePath, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = dataagentserviceModule.v1beta.DataAgentServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new dataagentserviceModule.v1beta.DataAgentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = dataagentserviceModule.v1beta.DataAgentServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataAgentServiceStub, undefined); + await client.initialize(); + assert(client.dataAgentServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.dataAgentServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataAgentServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + 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 dataagentserviceModule.v1beta.DataAgentServiceClient({ + 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('getDataAgent', () => { + it('invokes getDataAgent without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.DataAgent() + ); + client.innerApiCalls.getDataAgent = stubSimpleCall(expectedResponse); + const [response] = await client.getDataAgent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.DataAgent() + ); + client.innerApiCalls.getDataAgent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataAgent( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1beta.IDataAgent|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAgent with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataAgent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAgent with closed client', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDataAgent(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('createDataAgent', () => { + it('invokes createDataAgent without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAgent = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDataAgent(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAgent = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataAgent( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAgent with call error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAgent = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAgent with LRO error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAgent = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDataAgent(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDataAgentProgress without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateDataAgentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDataAgentProgress with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateDataAgentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataAgent', () => { + it('invokes updateDataAgent without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAgent = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataAgent(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAgent = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataAgent( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAgent with call error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAgent = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAgent with LRO error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest() + ); + request.dataAgent ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest', ['dataAgent', 'name']); + request.dataAgent.name = defaultValue1; + const expectedHeaderRequestParams = `data_agent.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAgent = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataAgent(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataAgentProgress without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateDataAgentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataAgentProgress with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateDataAgentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDataAgent', () => { + it('invokes deleteDataAgent without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAgent = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDataAgent(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAgent without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAgent = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataAgent( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAgent with call error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAgent = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDataAgent(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAgent with LRO error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAgent = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDataAgent(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAgent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDataAgentProgress without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteDataAgentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDataAgentProgress with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteDataAgentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listDataAgents', () => { + it('invokes listDataAgents without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.innerApiCalls.listDataAgents = stubSimpleCall(expectedResponse); + const [response] = await client.listDataAgents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAgents without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.innerApiCalls.listDataAgents = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataAgents( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAgents with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataAgents = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataAgents(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAgentsStream without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.descriptors.page.listDataAgents.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.DataAgent) => { + 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.listDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAgents, request)); + assert( + (client.descriptors.page.listDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataAgentsStream with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAgents.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.DataAgent) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAgents, request)); + assert( + (client.descriptors.page.listDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAgents without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.descriptors.page.listDataAgents.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[] = []; + const iterable = client.listDataAgentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAgents with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAgents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataAgentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAccessibleDataAgents', () => { + it('invokes listAccessibleDataAgents without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.innerApiCalls.listAccessibleDataAgents = stubSimpleCall(expectedResponse); + const [response] = await client.listAccessibleDataAgents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAccessibleDataAgents without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.innerApiCalls.listAccessibleDataAgents = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccessibleDataAgents( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAccessibleDataAgents with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAccessibleDataAgents = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAccessibleDataAgents(request), expectedError); + const actualRequest = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAccessibleDataAgents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAccessibleDataAgentsStream without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.descriptors.page.listAccessibleDataAgents.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAccessibleDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.DataAgent) => { + 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.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAccessibleDataAgents, request)); + assert( + (client.descriptors.page.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAccessibleDataAgentsStream with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAccessibleDataAgents.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAccessibleDataAgentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.DataAgent[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.DataAgent) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAccessibleDataAgents, request)); + assert( + (client.descriptors.page.listAccessibleDataAgents.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAccessibleDataAgents without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.DataAgent()), + ]; + client.descriptors.page.listAccessibleDataAgents.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[] = []; + const iterable = client.listAccessibleDataAgentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAccessibleDataAgents with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listAccessibleDataAgents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccessibleDataAgentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.IDataAgent[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAccessibleDataAgents.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('conversation', async () => { + const fakePath = "/rendered/path/conversation"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + conversation: "conversationValue", + }; + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.conversationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.conversationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('conversationPath', () => { + const result = client.conversationPath("projectValue", "locationValue", "conversationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.conversationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConversationName', () => { + const result = client.matchProjectFromConversationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromConversationName', () => { + const result = client.matchLocationFromConversationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchConversationFromConversationName', () => { + const result = client.matchConversationFromConversationName(fakePath); + assert.strictEqual(result, "conversationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAgent', async () => { + const fakePath = "/rendered/path/dataAgent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_agent: "dataAgentValue", + }; + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataAgentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAgentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAgentPath', () => { + const result = client.dataAgentPath("projectValue", "locationValue", "dataAgentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAgentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAgentName', () => { + const result = client.matchProjectFromDataAgentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAgentName', () => { + const result = client.matchLocationFromDataAgentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAgentFromDataAgentName', () => { + const result = client.matchDataAgentFromDataAgentName(fakePath); + assert.strictEqual(result, "dataAgentValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new dataagentserviceModule.v1beta.DataAgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-geminidataanalytics/test/gapic_data_chat_service_v1alpha.ts b/packages/google-cloud-geminidataanalytics/test/gapic_data_chat_service_v1alpha.ts new file mode 100644 index 000000000000..70c4bb6f7b0b --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/test/gapic_data_chat_service_v1alpha.ts @@ -0,0 +1,1518 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 datachatserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubServerStreamingCall(response?: ResponseType, error?: Error) { + const transformStub = error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // write something to the stream to trigger transformStub and send the response back to the client + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + return sinon.stub().returns(mockStream); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.DataChatServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = datachatserviceModule.v1alpha.DataChatServiceClient.servicePath; + assert.strictEqual(servicePath, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datachatserviceModule.v1alpha.DataChatServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datachatserviceModule.v1alpha.DataChatServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new datachatserviceModule.v1alpha.DataChatServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = datachatserviceModule.v1alpha.DataChatServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataChatServiceStub, undefined); + await client.initialize(); + assert(client.dataChatServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.dataChatServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataChatServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + 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 datachatserviceModule.v1alpha.DataChatServiceClient({ + 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('createConversation', () => { + it('invokes createConversation without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.Conversation() + ); + client.innerApiCalls.createConversation = stubSimpleCall(expectedResponse); + const [response] = await client.createConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation without error using callback', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.Conversation() + ); + client.innerApiCalls.createConversation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConversation( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1alpha.IConversation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConversation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createConversation(request), expectedError); + const actualRequest = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation with closed client', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createConversation(request), expectedError); + }); + }); + + describe('deleteConversation', () => { + it('invokes deleteConversation without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversation = stubSimpleCall(expectedResponse); + const [response] = await client.deleteConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversation without error using callback', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConversation( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversation with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConversation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteConversation(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversation with closed client', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.DeleteConversationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteConversation(request), expectedError); + }); + }); + + describe('getConversation', () => { + it('invokes getConversation without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.Conversation() + ); + client.innerApiCalls.getConversation = stubSimpleCall(expectedResponse); + const [response] = await client.getConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation without error using callback', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.Conversation() + ); + client.innerApiCalls.getConversation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConversation( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1alpha.IConversation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConversation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConversation(request), expectedError); + const actualRequest = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation with closed client', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getConversation(request), expectedError); + }); + }); + + describe('chat', () => { + it('invokes chat without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.Message() + ); + client.innerApiCalls.chat = stubServerStreamingCall(expectedResponse); + const stream = client.chat(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes chat without error and gaxServerStreamingRetries enabled', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + gaxServerStreamingRetries: true + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.Message() + ); + client.innerApiCalls.chat = stubServerStreamingCall(expectedResponse); + const stream = client.chat(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes chat with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.chat = stubServerStreamingCall(undefined, expectedError); + const stream = client.chat(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes chat with closed client', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + const stream = client.chat(request, {retryRequestOptions: {noResponseRetries: 0}}); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('listConversations', () => { + it('invokes listConversations without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + ]; + client.innerApiCalls.listConversations = stubSimpleCall(expectedResponse); + const [response] = await client.listConversations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations without error using callback', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + ]; + client.innerApiCalls.listConversations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversations( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1alpha.IConversation[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listConversations(request), expectedError); + const actualRequest = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversationsStream without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + ]; + client.descriptors.page.listConversations.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.Conversation[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.Conversation) => { + 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.listConversations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConversations, request)); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConversationsStream with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.Conversation[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.Conversation) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConversations, request)); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversations without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.Conversation()), + ]; + client.descriptors.page.listConversations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IConversation[] = []; + const iterable = client.listConversationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversations with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConversationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IConversation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listMessages', () => { + it('invokes listMessages without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + ]; + client.innerApiCalls.listMessages = stubSimpleCall(expectedResponse); + const [response] = await client.listMessages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessages without error using callback', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + ]; + client.innerApiCalls.listMessages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMessages( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessages with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMessages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMessages(request), expectedError); + const actualRequest = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessagesStream without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + ]; + client.descriptors.page.listMessages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMessagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage) => { + 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.listMessages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMessages, request)); + assert( + (client.descriptors.page.listMessages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMessagesStream with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMessages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMessagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMessages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMessages, request)); + assert( + (client.descriptors.page.listMessages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMessages without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1alpha.StorageMessage()), + ]; + client.descriptors.page.listMessages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage[] = []; + const iterable = client.listMessagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMessages with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1alpha.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMessages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMessagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1alpha.IStorageMessage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('conversation', async () => { + const fakePath = "/rendered/path/conversation"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + conversation: "conversationValue", + }; + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.conversationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.conversationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('conversationPath', () => { + const result = client.conversationPath("projectValue", "locationValue", "conversationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.conversationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConversationName', () => { + const result = client.matchProjectFromConversationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromConversationName', () => { + const result = client.matchLocationFromConversationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchConversationFromConversationName', () => { + const result = client.matchConversationFromConversationName(fakePath); + assert.strictEqual(result, "conversationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAgent', async () => { + const fakePath = "/rendered/path/dataAgent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_agent: "dataAgentValue", + }; + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataAgentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAgentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAgentPath', () => { + const result = client.dataAgentPath("projectValue", "locationValue", "dataAgentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAgentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAgentName', () => { + const result = client.matchProjectFromDataAgentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAgentName', () => { + const result = client.matchLocationFromDataAgentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAgentFromDataAgentName', () => { + const result = client.matchDataAgentFromDataAgentName(fakePath); + assert.strictEqual(result, "dataAgentValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new datachatserviceModule.v1alpha.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-geminidataanalytics/test/gapic_data_chat_service_v1beta.ts b/packages/google-cloud-geminidataanalytics/test/gapic_data_chat_service_v1beta.ts new file mode 100644 index 000000000000..5e02fc6f63c1 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/test/gapic_data_chat_service_v1beta.ts @@ -0,0 +1,1410 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 datachatserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubServerStreamingCall(response?: ResponseType, error?: Error) { + const transformStub = error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // write something to the stream to trigger transformStub and send the response back to the client + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + return sinon.stub().returns(mockStream); +} + +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('v1beta.DataChatServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = datachatserviceModule.v1beta.DataChatServiceClient.servicePath; + assert.strictEqual(servicePath, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datachatserviceModule.v1beta.DataChatServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'geminidataanalytics.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datachatserviceModule.v1beta.DataChatServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new datachatserviceModule.v1beta.DataChatServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'geminidataanalytics.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new datachatserviceModule.v1beta.DataChatServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = datachatserviceModule.v1beta.DataChatServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataChatServiceStub, undefined); + await client.initialize(); + assert(client.dataChatServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.dataChatServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataChatServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + 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 datachatserviceModule.v1beta.DataChatServiceClient({ + 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('createConversation', () => { + it('invokes createConversation without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.Conversation() + ); + client.innerApiCalls.createConversation = stubSimpleCall(expectedResponse); + const [response] = await client.createConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation without error using callback', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.Conversation() + ); + client.innerApiCalls.createConversation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConversation( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1beta.IConversation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConversation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createConversation(request), expectedError); + const actualRequest = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation with closed client', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createConversation(request), expectedError); + }); + }); + + describe('getConversation', () => { + it('invokes getConversation without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.Conversation() + ); + client.innerApiCalls.getConversation = stubSimpleCall(expectedResponse); + const [response] = await client.getConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation without error using callback', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.Conversation() + ); + client.innerApiCalls.getConversation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConversation( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1beta.IConversation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConversation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConversation(request), expectedError); + const actualRequest = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConversation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation with closed client', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.GetConversationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.GetConversationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getConversation(request), expectedError); + }); + }); + + describe('chat', () => { + it('invokes chat without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.Message() + ); + client.innerApiCalls.chat = stubServerStreamingCall(expectedResponse); + const stream = client.chat(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes chat without error and gaxServerStreamingRetries enabled', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + gaxServerStreamingRetries: true + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.Message() + ); + client.innerApiCalls.chat = stubServerStreamingCall(expectedResponse); + const stream = client.chat(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes chat with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.chat = stubServerStreamingCall(undefined, expectedError); + const stream = client.chat(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.chat as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes chat with closed client', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ChatRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ChatRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + const stream = client.chat(request, {retryRequestOptions: {noResponseRetries: 0}}); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.Message) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + + describe('listConversations', () => { + it('invokes listConversations without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + ]; + client.innerApiCalls.listConversations = stubSimpleCall(expectedResponse); + const [response] = await client.listConversations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations without error using callback', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + ]; + client.innerApiCalls.listConversations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversations( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1beta.IConversation[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listConversations(request), expectedError); + const actualRequest = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConversations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversationsStream without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + ]; + client.descriptors.page.listConversations.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.Conversation[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.Conversation) => { + 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.listConversations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConversations, request)); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConversationsStream with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.Conversation[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.Conversation) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConversations, request)); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversations without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.Conversation()), + ]; + client.descriptors.page.listConversations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1beta.IConversation[] = []; + const iterable = client.listConversationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversations with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConversationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.IConversation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listMessages', () => { + it('invokes listMessages without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + ]; + client.innerApiCalls.listMessages = stubSimpleCall(expectedResponse); + const [response] = await client.listMessages(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessages without error using callback', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + ]; + client.innerApiCalls.listMessages = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMessages( + request, + (err?: Error|null, result?: protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessages with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMessages = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMessages(request), expectedError); + const actualRequest = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMessages as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessagesStream without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + ]; + client.descriptors.page.listMessages.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMessagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.StorageMessage[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.StorageMessage) => { + 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.listMessages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMessages, request)); + assert( + (client.descriptors.page.listMessages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMessagesStream with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMessages.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMessagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.StorageMessage[] = []; + stream.on('data', (response: protos.google.cloud.geminidataanalytics.v1beta.StorageMessage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMessages.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMessages, request)); + assert( + (client.descriptors.page.listMessages.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMessages without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + generateSampleMessage(new protos.google.cloud.geminidataanalytics.v1beta.StorageMessage()), + ]; + client.descriptors.page.listMessages.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage[] = []; + const iterable = client.listMessagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMessages with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMessages.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMessagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.geminidataanalytics.v1beta.IStorageMessage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMessages.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('conversation', async () => { + const fakePath = "/rendered/path/conversation"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + conversation: "conversationValue", + }; + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.conversationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.conversationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('conversationPath', () => { + const result = client.conversationPath("projectValue", "locationValue", "conversationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.conversationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConversationName', () => { + const result = client.matchProjectFromConversationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromConversationName', () => { + const result = client.matchLocationFromConversationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchConversationFromConversationName', () => { + const result = client.matchConversationFromConversationName(fakePath); + assert.strictEqual(result, "conversationValue"); + assert((client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAgent', async () => { + const fakePath = "/rendered/path/dataAgent"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_agent: "dataAgentValue", + }; + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataAgentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAgentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAgentPath', () => { + const result = client.dataAgentPath("projectValue", "locationValue", "dataAgentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAgentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAgentName', () => { + const result = client.matchProjectFromDataAgentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAgentName', () => { + const result = client.matchLocationFromDataAgentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAgentFromDataAgentName', () => { + const result = client.matchDataAgentFromDataAgentName(fakePath); + assert.strictEqual(result, "dataAgentValue"); + assert((client.pathTemplates.dataAgentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new datachatserviceModule.v1beta.DataChatServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-geminidataanalytics/tsconfig.json b/packages/google-cloud-geminidataanalytics/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/google-cloud-geminidataanalytics/webpack.config.js b/packages/google-cloud-geminidataanalytics/webpack.config.js new file mode 100644 index 000000000000..0b979daa14f8 --- /dev/null +++ b/packages/google-cloud-geminidataanalytics/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: 'DataAgentService', + filename: './data-agent-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', +}; diff --git a/release-please-config.json b/release-please-config.json index 60f4b8eebdc4..72c682a2e671 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -214,7 +214,8 @@ "packages/google-cloud-saasplatform-saasservicemgmt": {}, "packages/google-cloud-cloudsecuritycompliance": {}, "packages/google-cloud-capacityplanner": {}, - "packages/google-cloud-locationfinder": {} + "packages/google-cloud-locationfinder": {}, + "packages/google-cloud-geminidataanalytics": {} }, "plugins": [ {